DATATYPE - The data type to be compared. Must somehow have a value that can be
compared as a float value.public abstract class AbstractFloatComparator<DATATYPE> extends AbstractComparator<DATATYPE>
| Constructor and Description |
|---|
AbstractFloatComparator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract float |
getAsFloat(DATATYPE aObject)
Protected method to convert the passed object into a float value.
|
protected int |
mainCompare(DATATYPE aElement1,
DATATYPE aElement2) |
compare, 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, thenComparingLongprotected abstract float getAsFloat(@Nonnull DATATYPE aObject)
aObject - The source objectprotected final int mainCompare(@Nonnull DATATYPE aElement1, @Nonnull DATATYPE aElement2)
mainCompare in class AbstractComparator<DATATYPE>aElement1 - First element to compare. Never null.aElement2 - Second element to compare. Never null.Copyright © 2014–2016 Philip Helger. All rights reserved.