DATATYPE - The data type to be comparedPARTTYPE - The part type that is extracted from the data element and compared@NotThreadSafe public class ConverterComparator<DATATYPE,PARTTYPE> extends AbstractPartComparator<DATATYPE,PARTTYPE>
Comparator for objects which are extracted from a
converter.| Constructor and Description |
|---|
ConverterComparator(Comparator<? super PARTTYPE> aPartComparator,
IConverter<DATATYPE,PARTTYPE> aConverter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
IConverter<DATATYPE,PARTTYPE> |
getConverter() |
protected PARTTYPE |
getPart(DATATYPE aObject)
Implement this method to extract the part to compare from the original
object.
|
getPartComparator, mainCompare, toStringcompare, getNestedComparator, getSortOrder, isNullValuesComeFirst, setNestedComparator, setNullValuesComeFirst, setSortOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequalspublic ConverterComparator(@Nonnull Comparator<? super PARTTYPE> aPartComparator, @Nonnull IConverter<DATATYPE,PARTTYPE> aConverter)
aPartComparator - The comparator for comparing the IDs. May not be null.aConverter - The converter to be used to extract the part from the source object.
May not be null.@Nonnull public final IConverter<DATATYPE,PARTTYPE> getConverter()
null.@Nullable protected final PARTTYPE getPart(@Nonnull DATATYPE aObject)
AbstractPartComparatorgetPart in class AbstractPartComparator<DATATYPE,PARTTYPE>aObject - The object to be compared. Never null.null.Copyright © 2014–2015 Philip Helger. All rights reserved.