DATATYPE - The type of elements to be compared.IDTYPE - The type of the ID of data type@NotThreadSafe public class ComparatorHasIDComparable<DATATYPE extends IHasID<IDTYPE>,IDTYPE extends Comparable<? super IDTYPE>> extends AbstractPartComparatorComparable<DATATYPE,IDTYPE>
Comparator for objects that implement the
IHasID interface with a class that implements Comparable.| Constructor and Description |
|---|
ComparatorHasIDComparable()
Comparator with default sort order and no nested comparator.
|
| Modifier and Type | Method and Description |
|---|---|
protected IDTYPE |
getPart(DATATYPE aObject)
Implement this method to extract the part to compare from the original
object.
|
mainComparecompare, getNestedComparator, getSortOrder, isNullValuesComeFirst, setNestedComparator, setNullValuesComeFirst, setSortOrder, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic ComparatorHasIDComparable()
@Nullable protected final IDTYPE getPart(@Nonnull DATATYPE aObject)
AbstractPartComparatorComparablegetPart in class AbstractPartComparatorComparable<DATATYPE extends IHasID<IDTYPE>,IDTYPE extends Comparable<? super IDTYPE>>aObject - The object to be compared. Never null.null.Copyright © 2014–2016 Philip Helger. All rights reserved.