DATATYPE - The type of elements to be compared.public final class ComparatorHasDisplayName<DATATYPE extends IHasDisplayName> extends AbstractCollationComparator<DATATYPE>
Comparator for objects that implement
the IHasDisplayName interface.| Constructor and Description |
|---|
ComparatorHasDisplayName(Locale aSortLocale)
Comparator with default sort order but special collation locale.
|
ComparatorHasDisplayName(Locale aSortLocale,
ESortOrder eSortOrder)
Comparator with special sort order and a special collation locale.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
asString(DATATYPE aObject)
Abstract method that needs to be overridden to convert an object to a
string representation for comparison.
|
getCollator, mainCompare, toStringcompare, getNestedComparator, getSortOrder, setSortOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic ComparatorHasDisplayName(@Nullable Locale aSortLocale)
aSortLocale - The collation locale to use. May be null.public ComparatorHasDisplayName(@Nullable Locale aSortLocale, @Nonnull ESortOrder eSortOrder)
aSortLocale - The collation locale to use. May be null.eSortOrder - The sorting order to use. May not be null.protected String asString(DATATYPE aObject)
AbstractCollationComparatorasString in class AbstractCollationComparator<DATATYPE extends IHasDisplayName>aObject - The object to be converted. May not be null depending
on the elements to be sorted.null.Copyright © 2014–2015 Philip Helger. All rights reserved.