DATATYPE - The type of elements to be compared.@NotThreadSafe public class CollatingComparatorHasDisplayText<DATATYPE extends IHasDisplayText> extends AbstractCollatingComparator<DATATYPE>
Comparator for objects that implement
the IHasDisplayText interface.| Constructor and Description |
|---|
CollatingComparatorHasDisplayText(Collator aCollator,
Locale aContentLocale)
Constructor.
|
CollatingComparatorHasDisplayText(Locale aSortLocale,
Locale aContentLocale)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Locale |
getContentLocale() |
protected String |
getPart(DATATYPE aObject)
Implement this method to extract the part to compare from the original
object.
|
getCollatorgetPartComparator, mainCompare, toStringcompare, getNestedComparator, getSortOrder, isNullValuesComeFirst, setNestedComparator, setNullValuesComeFirst, setSortOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequalspublic CollatingComparatorHasDisplayText(@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 CollatingComparatorHasDisplayText(@Nonnull Collator aCollator, @Nonnull Locale aContentLocale)
aCollator - The Collator to use. May not be null.aContentLocale - The locale to be used to retrieve the display text of an object. May
not be null.@Nonnull public Locale getContentLocale()
null.protected String getPart(@Nonnull DATATYPE aObject)
AbstractPartComparatorgetPart in class AbstractPartComparator<DATATYPE extends IHasDisplayText,String>aObject - The object to be compared. Never null.null.Copyright © 2014–2015 Philip Helger. All rights reserved.