fr.paris.lutece.plugins.directory.utils.sort
Class RecordComparator
java.lang.Object
fr.paris.lutece.plugins.directory.utils.sort.RecordComparator
- All Implemented Interfaces:
- Comparator<Record>
public class RecordComparator
- extends Object
- implements Comparator<Record>
RecordComparator
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RecordComparator
public RecordComparator(IEntry entry,
boolean bIsAscSort)
- Constructor
- Parameters:
nIdEntry
- ID entry to comparebIsAscSort
- true if it is sorted asc, false otherwise
compare
public int compare(Record r1,
Record r2)
- Compare two records
- Specified by:
compare
in interface Comparator<Record>
- Parameters:
r1
- Record 1r2
- Record 2
- Returns:
- < 0 if r1 is before r2 in the alphabetical order
0 if r1 equals r2
> 0 if r1 is after r2
Copyright © 2013 Mairie de Paris. All Rights Reserved.