it.unimi.dsi.fastutil.floats
Class AbstractFloatComparator
java.lang.Object
it.unimi.dsi.fastutil.floats.AbstractFloatComparator
- All Implemented Interfaces:
- FloatComparator, java.util.Comparator<java.lang.Float>
public abstract class AbstractFloatComparator
- extends java.lang.Object
- implements FloatComparator
An abstract class facilitating the creation of type-specific comparators.
To create a type-specific comparator you need both a method comparing
primitive types and a method comparing objects. However, if you have the
first one you can just inherit from this class and get for free the second
one.
- See Also:
Comparator
Method Summary |
abstract int |
compare(float k1,
float k2)
Compares the given primitive types. |
int |
compare(java.lang.Float ok1,
java.lang.Float ok2)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
compare
public int compare(java.lang.Float ok1,
java.lang.Float ok2)
- Specified by:
compare
in interface java.util.Comparator<java.lang.Float>
compare
public abstract int compare(float k1,
float k2)
- Description copied from interface:
FloatComparator
- Compares the given primitive types.
- Specified by:
compare
in interface FloatComparator
- Returns:
- A positive integer, zero, or a negative integer if the first
argument is greater than, equal to, or smaller than, respectively, the
second one.
- See Also:
Comparator