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.
|
mainCompare, toStringcompare, getSortOrder, setSortOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequalspublic 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 © 2006–2015 phloc systems. All rights reserved.