DATATYPE - The type of elements to be compared.public final class ComparatorHasDisplayText<DATATYPE extends IHasDisplayText> extends AbstractCollationComparator<DATATYPE>
Comparator for objects that implement
the IHasDisplayText interface.| Constructor and Description |
|---|
ComparatorHasDisplayText(Locale aSortLocale,
Locale aContentLocale)
Constructor.
|
ComparatorHasDisplayText(Locale aSortLocale,
Locale aContentLocale,
ESortOrder eSortOrder)
Constructor.
|
| 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.
|
Locale |
getContentLocale() |
mainCompare, toStringcompare, getSortOrder, setSortOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequalspublic ComparatorHasDisplayText(@Nullable Locale aSortLocale, @Nonnull Locale aContentLocale)
aSortLocale - The locale to be used for sorting. May be null.aContentLocale - The locale to be used to retrieve the display text of an object. May
not be null.public ComparatorHasDisplayText(@Nullable Locale aSortLocale, @Nonnull Locale aContentLocale, @Nonnull ESortOrder eSortOrder)
aSortLocale - The locale to be used for sorting. May be null.aContentLocale - The locale to be used to retrieve the display text of an object. May
not be null.eSortOrder - The sort order to be used. May not be null.protected String asString(DATATYPE aObject)
AbstractCollationComparatorasString in class AbstractCollationComparator<DATATYPE extends IHasDisplayText>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.