Class ByDateComparator
- java.lang.Object
-
- com.funnelback.publicui.search.model.transaction.facet.order.ByDateComparator
-
- All Implemented Interfaces:
java.util.Comparator<Facet.CategoryValue>
public class ByDateComparator extends java.lang.Object implements java.util.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 java.util.Comparator<java.lang.Integer>
comparator
private static java.util.Map<java.lang.String,java.lang.Integer>
DATE_LABELS_VALUES
private com.funnelback.common.config.DefaultValues.FacetedNavigation.DateSortMode
sortMode
-
Constructor Summary
Constructors Constructor Description ByDateComparator(com.funnelback.common.config.DefaultValues.FacetedNavigation.DateSortMode sortMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Facet.CategoryValue cv1, Facet.CategoryValue cv2)
java.lang.Integer
getIntegerFromCategory(Facet.CategoryValue catVal)
java.lang.Integer
tryParseInt(java.lang.String val)
-
-
-
Field Detail
-
DATE_LABELS_VALUES
private static final java.util.Map<java.lang.String,java.lang.Integer> DATE_LABELS_VALUES
-
sortMode
private final com.funnelback.common.config.DefaultValues.FacetedNavigation.DateSortMode sortMode
-
comparator
private final java.util.Comparator<java.lang.Integer> comparator
-
-
Method Detail
-
compare
public int compare(Facet.CategoryValue cv1, Facet.CategoryValue cv2)
- Specified by:
compare
in interfacejava.util.Comparator<Facet.CategoryValue>
-
getIntegerFromCategory
public java.lang.Integer getIntegerFromCategory(Facet.CategoryValue catVal)
-
tryParseInt
public java.lang.Integer tryParseInt(java.lang.String val)
-
-