Class FacetComparatorProvider
- java.lang.Object
-
- com.funnelback.publicui.search.model.transaction.facet.order.FacetComparatorProvider
-
public class FacetComparatorProvider extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
FacetComparatorProvider.AsIsComparator
private static class
FacetComparatorProvider.ChainComparator<T>
-
Field Summary
Fields Modifier and Type Field Description private Map<FacetValuesOrder,Comparator<Facet.CategoryValue>>
FACET_ORDER_TO_COMPARATOR
-
Constructor Summary
Constructors Constructor Description FacetComparatorProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) Comparator<Facet.CategoryValue>
getComparator(FacetValuesOrder orderToSortBy, Optional<Comparator<Facet.CategoryValue>> customComparator)
Comparator<Facet.CategoryValue>
getComparatorWhenSortingAllValues(List<FacetValuesOrder> ordersToSortBy, Optional<Comparator<Facet.CategoryValue>> customComparator)
Gets the comparator to use when we are sorting on ALL category values.(package private) Comparator<Facet.CategoryValue>
makeComparatorChain(List<FacetValuesOrder> ordersToSortBy, Optional<Comparator<Facet.CategoryValue>> customComparator)
Creates a comparator by chaining the wanted comparators.
-
-
-
Field Detail
-
FACET_ORDER_TO_COMPARATOR
private final Map<FacetValuesOrder,Comparator<Facet.CategoryValue>> FACET_ORDER_TO_COMPARATOR
-
-
Method Detail
-
getComparator
Comparator<Facet.CategoryValue> getComparator(FacetValuesOrder orderToSortBy, Optional<Comparator<Facet.CategoryValue>> customComparator)
-
makeComparatorChain
Comparator<Facet.CategoryValue> makeComparatorChain(List<FacetValuesOrder> ordersToSortBy, Optional<Comparator<Facet.CategoryValue>> customComparator)
Creates a comparator by chaining the wanted comparators.- Parameters:
ordersToSortBy
- The list describing the comparators wanted.- Returns:
-
getComparatorWhenSortingAllValues
public Comparator<Facet.CategoryValue> getComparatorWhenSortingAllValues(List<FacetValuesOrder> ordersToSortBy, Optional<Comparator<Facet.CategoryValue>> customComparator)
Gets the comparator to use when we are sorting on ALL category values.- Parameters:
ordersToSortBy
-- Returns:
-
-