Package com._1c.g5.v8.dt.common
Class EMFCompareUtils.EqualityHelper
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject>
com._1c.g5.v8.dt.common.EMFCompareUtils.EqualityHelper
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<org.eclipse.emf.ecore.EObject,
org.eclipse.emf.ecore.EObject>
- Enclosing class:
- EMFCompareUtils
public static class EMFCompareUtils.EqualityHelper
extends HashMap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected EMFCompareUtils.Diff
equalFeatureMaps
(org.eclipse.emf.ecore.util.FeatureMap featureMap1, org.eclipse.emf.ecore.util.FeatureMap featureMap2, org.eclipse.emf.ecore.EAttribute attribute) Returns whether the two feature maps areequal
.protected EMFCompareUtils.Diff
equalFeatureMapValues
(Object value1, Object value2, org.eclipse.emf.ecore.EStructuralFeature feature) Returns whether the two values of a feature map areequal
.equals
(List<org.eclipse.emf.ecore.EObject> list1, List<org.eclipse.emf.ecore.EObject> list2, org.eclipse.emf.ecore.EStructuralFeature feature) equals
(org.eclipse.emf.ecore.EObject eObject1, org.eclipse.emf.ecore.EObject eObject2) protected EMFCompareUtils.Diff
haveEqualAttribute
(org.eclipse.emf.ecore.EObject eObject1, org.eclipse.emf.ecore.EObject eObject2, org.eclipse.emf.ecore.EAttribute attribute) Returns whether the two objects haveequal
value
s for the attribute.protected EMFCompareUtils.Diff
haveEqualFeature
(org.eclipse.emf.ecore.EObject eObject1, org.eclipse.emf.ecore.EObject eObject2, org.eclipse.emf.ecore.EStructuralFeature feature) protected EMFCompareUtils.Diff
haveEqualReference
(org.eclipse.emf.ecore.EObject eObject1, org.eclipse.emf.ecore.EObject eObject2, org.eclipse.emf.ecore.EReference reference) Returns whether the two objects haveequal
value
s for the reference.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
EqualityHelper
public EqualityHelper()
-
-
Method Details
-
equals
public EMFCompareUtils.Diff equals(org.eclipse.emf.ecore.EObject eObject1, org.eclipse.emf.ecore.EObject eObject2) - Returns:
- whether
eObject1
andeObject2
are equal. - Since:
- 2.1.0
-
equals
public EMFCompareUtils.Diff equals(List<org.eclipse.emf.ecore.EObject> list1, List<org.eclipse.emf.ecore.EObject> list2, org.eclipse.emf.ecore.EStructuralFeature feature) Returns whetherlist1
andlist2
containequal
EObject
s at the same index. It is assumed that list1 and list2 only contain EObjects.- Returns:
- whether
list1
andlist2
contain equal objects. - Since:
- 2.1.0
-
haveEqualFeature
protected EMFCompareUtils.Diff haveEqualFeature(org.eclipse.emf.ecore.EObject eObject1, org.eclipse.emf.ecore.EObject eObject2, org.eclipse.emf.ecore.EStructuralFeature feature) - Returns:
- whether the two objects have equal isSet states and values for the feature.
- Since:
- 2.2.0
- See Also:
-
equals(EObject, EObject)
#equals(List, List)
-
haveEqualReference
protected EMFCompareUtils.Diff haveEqualReference(org.eclipse.emf.ecore.EObject eObject1, org.eclipse.emf.ecore.EObject eObject2, org.eclipse.emf.ecore.EReference reference) Returns whether the two objects haveequal
value
s for the reference.- Returns:
- whether the two objects have equal values for the reference.
- Since:
- 2.1.0
- See Also:
-
equals(EObject, EObject)
#equals(List, List)
-
haveEqualAttribute
protected EMFCompareUtils.Diff haveEqualAttribute(org.eclipse.emf.ecore.EObject eObject1, org.eclipse.emf.ecore.EObject eObject2, org.eclipse.emf.ecore.EAttribute attribute) Returns whether the two objects haveequal
value
s for the attribute.- Returns:
- whether the two objects have equal values for the attribute.
- Since:
- 2.1.0
- See Also:
-
#equalFeatureMaps(FeatureMap, FeatureMap)
-
equalFeatureMaps
protected EMFCompareUtils.Diff equalFeatureMaps(org.eclipse.emf.ecore.util.FeatureMap featureMap1, org.eclipse.emf.ecore.util.FeatureMap featureMap2, org.eclipse.emf.ecore.EAttribute attribute) Returns whether the two feature maps areequal
.- Returns:
- whether the two feature maps are equal.
- Since:
- 2.1.0
-
equalFeatureMapValues
protected EMFCompareUtils.Diff equalFeatureMapValues(Object value1, Object value2, org.eclipse.emf.ecore.EStructuralFeature feature) Returns whether the two values of a feature map areequal
.- Returns:
- whether the two values of a feature map are equal.
- Since:
- 2.2.0
-