| java.lang.Object org.obe.engine.util.PropertyComparator
All known Subclasses: org.obe.engine.util.CollatedPropertyComparator,
PropertyComparator | public class PropertyComparator implements Comparator(Code) | | Performs multi-level property-based comparisons between objects of a
specified class. The named properties must either be of a primitive type, or
of a class that implements the java.lang.Comparable interface.
The class is threadsafe, so it is not necessary to pool or repeatedly
allocate instances.
author: Adrian Price. |
compare | public int compare(Object o1, Object o2, int index)(Code) | | Compares the properties at the specified index.
Parameters: o1 - Parameters: o2 - Parameters: index - Index into the propNames array passed to theconstructor. -1 means compare all properties. The result of the comparison. |
|
|