A helper for determining whether two
EObjects are structurally equal.
eObject2, are structurally equal
classes are the same,
and if, for each
feature of the class,
isSet states are the same
and the corresponding
values are structurally equal
as appropriate for the type of feature.
feature map features,
entries at corresponding positions
must have the same
and must have structurally equal
as appropriate for the type of entry's feature.
the corresponding values must recursively be structurally equal according to this definition.
the corresponding values must be equal according to Java equality.
Note that container references are derived and hence are ignored.
During the recursive process of determining
the helper instance is populated as a two way map
such that a given
eObject1 is considered to be equal to at most one other
get(eObject1) == eObject2 && get(eObject2) == eObject1.
While their features are being compared, the two objects are assumed to be equal:
put(eObject1, eObject2); put(eObject2, eObject1);Once that correspondence is established, an
eObject1considered equal to a different
eObject2will not even be considered equal to itself. This ensures that two objects are structurally equal only if the graphs formed by all their referenced objects have the same topology.
|Constructor and Description|
|Modifier and Type||Method and Description|
Returns whether the two feature maps are
Returns whether the two values of a feature map are
Returns whether value1 and value2 are structurally equal.
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
equalin the context of this helper instance.
EObjects at the same index. It is assumed that list1 and list2 only contain EObjects.
list2contain equal objects.
protected boolean haveEqualFeature(EObject eObject1, EObject eObject2, EStructuralFeature feature)
protected boolean haveEqualReference(EObject eObject1, EObject eObject2, EReference reference)
protected boolean haveEqualAttribute(EObject eObject1, EObject eObject2, EAttribute attribute)
protected boolean equalValues(java.lang.Object value1, java.lang.Object value2)
value1- the first non-null value.
value2- the second potentially null value.
protected boolean equalFeatureMaps(FeatureMap featureMap1, FeatureMap featureMap2)