IDTYPE - The type of the IDDATATYPE - The type of elements to be compared.public class ComparatorHasID<IDTYPE,DATATYPE extends IHasID<IDTYPE>> extends AbstractPartComparator<DATATYPE,IDTYPE>
Comparator for objects that implement
the IHasID interface with a class that does NOT implements
Comparable.| Constructor and Description |
|---|
ComparatorHasID(Comparator<? super DATATYPE> aNestedComparator,
Comparator<? super IDTYPE> aIDComparator)
Comparator with default sort order and a nested comparator.
|
ComparatorHasID(Comparator<? super IDTYPE> aIDComparator)
Comparator with default sort order and no nested comparator.
|
ComparatorHasID(ESortOrder eSortOrder,
Comparator<? super DATATYPE> aNestedComparator,
Comparator<? super IDTYPE> aIDComparator)
Constructor with sort order and a nested comparator.
|
ComparatorHasID(ESortOrder eSortOrder,
Comparator<? super IDTYPE> aIDComparator)
Constructor with sort order and no nested comparator.
|
| Modifier and Type | Method and Description |
|---|---|
protected IDTYPE |
getPart(DATATYPE aObject) |
mainComparecompare, getSortOrder, setSortOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic ComparatorHasID(@Nonnull Comparator<? super IDTYPE> aIDComparator)
aIDComparator - The comparator for comparing the IDs. May not be null.public ComparatorHasID(@Nonnull ESortOrder eSortOrder, @Nonnull Comparator<? super IDTYPE> aIDComparator)
eSortOrder - The sort order to use. May not be null.aIDComparator - The comparator for comparing the IDs. May not be null.public ComparatorHasID(@Nullable Comparator<? super DATATYPE> aNestedComparator, @Nonnull Comparator<? super IDTYPE> aIDComparator)
aNestedComparator - The nested comparator to be invoked, when the main comparison
resulted in 0.aIDComparator - The comparator for comparing the IDs. May not be null.public ComparatorHasID(@Nonnull ESortOrder eSortOrder, @Nullable Comparator<? super DATATYPE> aNestedComparator, @Nonnull Comparator<? super IDTYPE> aIDComparator)
eSortOrder - The sort order to use. May not be null.aNestedComparator - The nested comparator to be invoked, when the main comparison
resulted in 0.aIDComparator - The comparator for comparing the IDs. May not be null.Copyright © 2006–2014 phloc systems. All rights reserved.