it.unimi.dsi.fastutil.bytes
Class AbstractByteComparator
java.lang.Object
it.unimi.dsi.fastutil.bytes.AbstractByteComparator
- All Implemented Interfaces:
- ByteComparator, Comparator<Byte>
public abstract class AbstractByteComparator
- extends Object
- implements ByteComparator
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(byte k1,
byte k2)
Compares the given primitive types. |
int |
compare(Byte ok1,
Byte ok2)
|
compare
public int compare(Byte ok1,
Byte ok2)
- Specified by:
compare
in interface Comparator<Byte>
compare
public abstract int compare(byte k1,
byte k2)
- Description copied from interface:
ByteComparator
- Compares the given primitive types.
- Specified by:
compare
in interface ByteComparator
- 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