Class UsageChargeEntryModelSortService
java.lang.Object
de.hybris.platform.subscriptionservices.model.impl.UsageChargeEntryModelSortService
- All Implemented Interfaces:
ModelSortService<UsageChargeEntryModel>
public class UsageChargeEntryModelSortService
extends Object
implements ModelSortService<UsageChargeEntryModel>
This service provides functionality for sorting collections of
UsageChargeEntryModel instances. It sorts
instances of TierUsageChargeEntryModel by their "tierStart" attribute (ascending) and adds any instance of
OverageUsageChargeEntryModel to the end of the sorted list.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetIntValue(Integer value) protected booleanisLowestTierUsageChargeEntry(TierUsageChargeEntryModel lowestTierUsageChargeEntry, TierUsageChargeEntryModel tierUsageChargeEntry) sort(Collection<UsageChargeEntryModel> unsorted) Returns a sortedListof the elements in the givenCollection.protected List<UsageChargeEntryModel>sort(List<UsageChargeEntryModel> sorted, Collection<UsageChargeEntryModel> unsorted)
-
Constructor Details
-
UsageChargeEntryModelSortService
public UsageChargeEntryModelSortService()
-
-
Method Details
-
sort
@Nullable public List<UsageChargeEntryModel> sort(@Nullable Collection<UsageChargeEntryModel> unsorted) Description copied from interface:ModelSortServiceReturns a sortedListof the elements in the givenCollection.- Specified by:
sortin interfaceModelSortService<UsageChargeEntryModel>- Parameters:
unsorted- a Collection of elements to be sorted- Returns:
- the sorted List of elements
-
sort
protected List<UsageChargeEntryModel> sort(List<UsageChargeEntryModel> sorted, Collection<UsageChargeEntryModel> unsorted) -
isLowestTierUsageChargeEntry
protected boolean isLowestTierUsageChargeEntry(TierUsageChargeEntryModel lowestTierUsageChargeEntry, TierUsageChargeEntryModel tierUsageChargeEntry) -
getIntValue
-