public class AttributeComparator extends Object implements Comparator<Object>, Serializable
Constructor and Description |
---|
AttributeComparator(String strSortedAttribute)
Constructor
|
AttributeComparator(String strSortedAttribute,
boolean bIsASC)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
compare(Object o1,
Object o2)
Compare two objects o1 and o2.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public AttributeComparator(String strSortedAttribute, boolean bIsASC)
strSortedAttribute
- the name of the attribute on which the sort will be
madebIsASC
- true for the ASC order, false for the DESC orderpublic AttributeComparator(String strSortedAttribute)
strSortedAttribute
- the name of the attribute on which the sort will be
madepublic int compare(Object o1, Object o2)
compare
in interface Comparator<Object>
o1
- Objecto2
- ObjectCopyright © 2020 City of Paris. All rights reserved.