Package org.ametys.web.filter
Class DefaultWebContentFilter.ContentComparator
java.lang.Object
org.ametys.web.filter.DefaultWebContentFilter.ContentComparator
- All Implemented Interfaces:
Comparator<Content>
- Enclosing class:
- DefaultWebContentFilter
protected class DefaultWebContentFilter.ContentComparator
extends Object
implements Comparator<Content>
Compares two contents based on a given list of sort criteria.
In jackrabbit, in ascending order, if the first content does not have the wanted value set,
it's considered to be ordered *before* ("less than") the second content (the JCR spec specifies this behavior as "implementation-defined").
-
Field Summary
-
Constructor Summary
ConstructorDescriptionContentComparator
(SortCriteria sortCriteria) Build a content comparator from sort criteria. -
Method Summary
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 Details
-
_sort
The sort criteria.
-
-
Constructor Details
-
ContentComparator
Build a content comparator from sort criteria.- Parameters:
sortCriteria
- The sort criteria
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<Content>
-