Class DefaultCommercePriceService.PriceInformationComparator
- java.lang.Object
-
- de.hybris.platform.commerceservices.util.AbstractComparator<PriceInformation>
-
- de.hybris.platform.commerceservices.price.impl.DefaultCommercePriceService.PriceInformationComparator
-
- All Implemented Interfaces:
java.util.Comparator<PriceInformation>
- Enclosing class:
- DefaultCommercePriceService
public static class DefaultCommercePriceService.PriceInformationComparator extends AbstractComparator<PriceInformation>
Comparator to naturally order PriceInformation by price value ascending
-
-
Field Summary
Fields Modifier and Type Field Description static DefaultCommercePriceService.PriceInformationComparatorINSTANCE-
Fields inherited from class de.hybris.platform.commerceservices.util.AbstractComparator
AFTER, BEFORE, EQUAL
-
-
Constructor Summary
Constructors Constructor Description PriceInformationComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcompareInstances(PriceInformation price1, PriceInformation price2)Implement method to perform the comparison.-
Methods inherited from class de.hybris.platform.commerceservices.util.AbstractComparator
compare, compareValues, compareValues, compareValues, compareValues, compareValues, instanceEquals
-
-
-
-
Field Detail
-
INSTANCE
public static final DefaultCommercePriceService.PriceInformationComparator INSTANCE
-
-
Method Detail
-
compareInstances
protected int compareInstances(PriceInformation price1, PriceInformation price2)
Description copied from class:AbstractComparatorImplement method to perform the comparison. The instances passed are different and neither is null.- Specified by:
compareInstancesin classAbstractComparator<PriceInformation>- Parameters:
price1- first instanceprice2- second instance- Returns:
- return one of
AbstractComparator.BEFORE,AbstractComparator.EQUAL, orAbstractComparator.AFTER.
-
-