fr.paris.lutece.plugins.whatsnew.utils.sort
Class WhatsNewComparator
java.lang.Object
fr.paris.lutece.plugins.whatsnew.utils.sort.WhatsNewComparator
- All Implemented Interfaces:
- Serializable, Comparator<IWhatsNew>
public class WhatsNewComparator
- extends Object
- implements Comparator<IWhatsNew>, Serializable
WhatsNewComparator
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WhatsNewComparator
public WhatsNewComparator(int nOrder,
boolean bIsAscSort)
- Constructor
- Parameters:
nOrder - orderbIsAscSort - true if it is sorted asc, false otherwise
compare
public int compare(IWhatsNew w1,
IWhatsNew w2)
- Compare two WhatsNew
- Specified by:
compare in interface Comparator<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
Copyright © 2013 Mairie de Paris. All Rights Reserved.