Class DefaultObjectAttributeComparator
- java.lang.Object
-
- com.hybris.cockpitng.compare.impl.DefaultObjectAttributeComparator
-
- All Implemented Interfaces:
ObjectAttributeComparator<java.lang.Object>
public class DefaultObjectAttributeComparator extends java.lang.Object implements ObjectAttributeComparator<java.lang.Object>
Default comparator forItemComparisonFacade
-
-
Constructor Summary
Constructors Constructor Description DefaultObjectAttributeComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancompareCollections(java.util.Collection coll1, java.util.Collection coll2)Compares collectionsprotected booleancompareMapObjects(java.util.Map map1, java.util.Map map2)Compare Map type objects.protected booleancompareSingleObjects(java.lang.Object object1, java.lang.Object object2)Compares single (non-collection) values.protected ObjectAttributeComparator<java.util.Map>getMapComparator()booleanisEqual(java.lang.Object object1, java.lang.Object object2)Checks, if two values are considered equal.voidsetMapComparator(ObjectAttributeComparator<java.util.Map> mapComparator)
-
-
-
Method Detail
-
isEqual
public boolean isEqual(java.lang.Object object1, java.lang.Object object2)Checks, if two values are considered equal.- Specified by:
isEqualin interfaceObjectAttributeComparator<java.lang.Object>- Parameters:
object1- first object valueobject2- second object value- Returns:
- true, if equal, false otherwise
-
compareMapObjects
protected boolean compareMapObjects(java.util.Map map1, java.util.Map map2)Compare Map type objects.- Parameters:
map1- first map objectmap2- second map object- Returns:
- true, if equal, false otherwise
-
compareSingleObjects
protected boolean compareSingleObjects(java.lang.Object object1, java.lang.Object object2)Compares single (non-collection) values.- Parameters:
object1- first object valueobject2- second object value- Returns:
- true, if equal, false otherwise
-
compareCollections
protected boolean compareCollections(java.util.Collection coll1, java.util.Collection coll2)Compares collections- Parameters:
coll1- the first collectioncoll2- the second collection- Returns:
- true, if equal, false otherwise
-
getMapComparator
protected ObjectAttributeComparator<java.util.Map> getMapComparator()
-
setMapComparator
public void setMapComparator(ObjectAttributeComparator<java.util.Map> mapComparator)
-
-