Package com.jalios.jcms
Class Publication.RelatedCategoryComparator<T extends Publication>
java.lang.Object
com.jalios.jstore.BasicStorable.CdateComparator<T>
com.jalios.jcms.Publication.PdateComparator<T>
com.jalios.jcms.Publication.RelatedCategoryComparator<T>
- Type Parameters:
T- a type of Publication
- All Implemented Interfaces:
Comparator<T>
- Enclosing class:
Publication
public static class Publication.RelatedCategoryComparator<T extends Publication>
extends Publication.PdateComparator<T>
Publication are sorted according the count of common categories with the given category set.
In case of equality, a custom super comparator can be provided.
- Since:
- jcms-10.0.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRelatedCategoryComparator(Set<Category> catSet) RelatedCategoryComparator(Set<Category> catSet, Comparator<T> superComparator) -
Method Summary
Methods inherited from class com.jalios.jstore.BasicStorable.CdateComparator
compareDateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
catSet
-
superComparator
-
-
Constructor Details
-
RelatedCategoryComparator
-
RelatedCategoryComparator
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<T extends Publication>- Overrides:
comparein classPublication.PdateComparator<T extends Publication>
-