public class SmartComparator extends Object implements Comparator<Object>
| Constructor and Description |
|---|
SmartComparator(String name)
Smart comparator for given property or field name and default settings for nullsFirst (true)
and caseSensitive (false).
|
SmartComparator(String name,
boolean nullsFirst,
boolean caseSensitive)
Smart comparator for given property or field name with explicit settings for nullsFirst and
caseSensitive.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Object bean1,
Object bean2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic SmartComparator(String name)
name - If prefixed with an "@", is treated as the name of an instance field; otherwise,
is treated as a property name.public SmartComparator(String name, boolean nullsFirst, boolean caseSensitive)
name - If prefixed with an "@", is treated as the name of an instance field; otherwise,
is treated as a property name.nullsFirst - If true, nulls sort before non-nulls.caseSensitive - If true, string comparisons are case-sensitive.public int compare(Object bean1, Object bean2)
compare in interface Comparator<Object>Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.