Class DefaultObjectAttributeComparator
- java.lang.Object
-
- de.hybris.platform.cockpit.services.values.impl.DefaultObjectAttributeComparator
-
- All Implemented Interfaces:
ObjectAttributeComparator
- Direct Known Subclasses:
ProductAwareAttributeComparator
public class DefaultObjectAttributeComparator extends java.lang.Object implements ObjectAttributeComparator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DefaultObjectAttributeComparator.AttributeComparisonContext
-
Constructor Summary
Constructors Constructor Description DefaultObjectAttributeComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
compareCollections(java.util.Collection coll1, java.util.Collection coll2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
Compares collectionsprotected boolean
compareFeatures(FeatureValue feature1, FeatureValue feature2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
Compares two FeatureValue objects.protected boolean
comparePlainObjects(java.lang.Object object1, java.lang.Object object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
Compares objects that are not instances of TypedObjectprotected boolean
compareSingleObjects(java.lang.Object object1, java.lang.Object object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
Compares single (non-collection) values.protected boolean
compareTypedObjects(TypedObject object1, TypedObject object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
Compares objects that are instances of TypedObjectboolean
isEqual(ObjectValuePair value1, ObjectValuePair value2)
Checks, if two values are considered equal.
-
-
-
Method Detail
-
isEqual
public boolean isEqual(ObjectValuePair value1, ObjectValuePair value2)
Description copied from interface:ObjectAttributeComparator
Checks, if two values are considered equal. Takes two ObjectValuePairs as parameters, which hold informations about the values itself and the items and property descriptors from which they are referenced.- Specified by:
isEqual
in interfaceObjectAttributeComparator
- Parameters:
value1
- the first ObjectValuePairvalue2
- the second ObjectValuePair- Returns:
- true, if equal, false otherwise
-
compareSingleObjects
protected boolean compareSingleObjects(java.lang.Object object1, java.lang.Object object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
Compares single (non-collection) values.- Parameters:
object1
- the first valueobject2
- the second valuectx
- the context, holds informations about referencing items and property descriptor- Returns:
- true, if equal, false otherwise
-
comparePlainObjects
protected boolean comparePlainObjects(java.lang.Object object1, java.lang.Object object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
Compares objects that are not instances of TypedObject- Parameters:
object1
- the first valueobject2
- the second valuectx
- the context, holds informations about referencing items and property descriptor- Returns:
- true, if equal, false otherwise
-
compareFeatures
protected boolean compareFeatures(FeatureValue feature1, FeatureValue feature2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
Compares two FeatureValue objects.- Returns:
- true, if value, description and unit attributes are equal.
-
compareTypedObjects
protected boolean compareTypedObjects(TypedObject object1, TypedObject object2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
Compares objects that are instances of TypedObject- Parameters:
object1
- the first valueobject2
- the second valuectx
- the context, holds informations about referencing items and property descriptor- Returns:
- true, if equal, false otherwise
-
compareCollections
protected boolean compareCollections(java.util.Collection coll1, java.util.Collection coll2, DefaultObjectAttributeComparator.AttributeComparisonContext ctx)
Compares collections- Parameters:
coll1
- the first collectioncoll2
- the second collectionctx
- the context, holds informations about referencing items and property descriptor- Returns:
- true, if equal, false otherwise
-
-