Class WhatsNewComparator
java.lang.Object
fr.paris.lutece.plugins.whatsnew.utils.sort.WhatsNewComparator
- All Implemented Interfaces:
Serializable,Comparator<IWhatsNew>
WhatsNewComparator
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
WhatsNewComparator
public WhatsNewComparator(int nOrder, boolean bIsAscSort) Constructor- Parameters:
nOrder- orderbIsAscSort- true if it is sorted asc, false otherwise
-
-
Method Details
-
compare
Compare two WhatsNew- Specified by:
comparein interfaceComparator<IWhatsNew>- Parameters:
w1- WhatsNew 1w2- WhatsNew 2- Returns:
- in the ascending sort :
- < 0 if w1 is before w2
- 0 if w1 equals w2
- > 0 if w1 is after w2
-