public class IlvPropertyComparator extends Object implements Comparator
IlvPropertyComparator
compares the value of a bean or
user-defined property on two data model objects.Constructor and Description |
---|
IlvPropertyComparator(String propertyName)
Creates a new
IlvPropertyComparator that will compare the
value of the specified property on two data model objects. |
Modifier and Type | Method and Description |
---|---|
int |
compare(Object o1,
Object o2)
Compares the property value between two data model objects for ordering.
|
boolean |
equals(Object obj)
Returns whether the specified object is "equal to" this comparator.
|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public IlvPropertyComparator(String propertyName)
IlvPropertyComparator
that will compare the
value of the specified property on two data model objects. The data objects
can be IlvUserPropertyHolder
implementations or Java Beans.propertyName
- The property that will be compared.public int compare(Object o1, Object o2)
compare
in interface Comparator
o1
- The first data model object. The object can be an
IlvUserPropertyHolder
implementation or a Java Bean.o2
- The second data model object. The object can be an
IlvUserPropertyHolder
implementation or a Java Bean.public boolean equals(Object obj)
equals
in interface Comparator
equals
in class Object
obj
- The object to compare against this comparator.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.