Package com.jalios.jcms
Class Publication.SdateComparator<T extends Publication>
- java.lang.Object
-
- com.jalios.jstore.BasicStorable.CdateComparator<T>
-
- com.jalios.jcms.Publication.PdateComparator<T>
-
- com.jalios.jcms.Publication.SdateComparator<T>
-
- Type Parameters:
T
- a type of Publication
- All Implemented Interfaces:
java.util.Comparator<T>
- Enclosing class:
- Publication
public static class Publication.SdateComparator<T extends Publication> extends Publication.PdateComparator<T>
Compares two Publications using their Sdate in descending order (newest date first). If for one of the publication the Sdate null, uses the pdate to compare it to the other sdate, and if the pdate is null, uses the cdate. Note: this comparator imposes orderings that are inconsistent with equals.- Since:
- jcms-4.0
-
-
Constructor Summary
Constructors Constructor Description SdateComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(T p1, T p2)
-
Methods inherited from class com.jalios.jstore.BasicStorable.CdateComparator
compareDate
-
-
-
-
Method Detail
-
compare
public int compare(T p1, T p2)
- Specified by:
compare
in interfacejava.util.Comparator<T extends Publication>
- Overrides:
compare
in classPublication.PdateComparator<T extends Publication>
-
-