Class ByDateComparator
- java.lang.Object
-
- com.funnelback.publicui.search.model.transaction.facet.order.ByDateComparator
-
- All Implemented Interfaces:
Comparator<Facet.CategoryValue>
public class ByDateComparator extends Object implements Comparator<Facet.CategoryValue>
CompareFacet.CategoryValue
containing date-based facet values and sort them in reverse chronological order.
-
-
Field Summary
Fields Modifier and Type Field Description private Comparator<Integer>
comparator
private static Map<String,Integer>
DATE_LABELS_VALUES
-
Constructor Summary
Constructors Constructor Description ByDateComparator(boolean ascending)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Facet.CategoryValue cv1, Facet.CategoryValue cv2)
Integer
getIntegerFromCategory(Facet.CategoryValue catVal)
Integer
tryParseInt(String val)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
comparator
private final Comparator<Integer> comparator
-
-
Method Detail
-
compare
public int compare(Facet.CategoryValue cv1, Facet.CategoryValue cv2)
- Specified by:
compare
in interfaceComparator<Facet.CategoryValue>
-
getIntegerFromCategory
public Integer getIntegerFromCategory(Facet.CategoryValue catVal)
-
-