it.unimi.dsi.fastutil.shorts
Interface ShortComparator
- All Superinterfaces:
- Comparator
- All Known Implementing Classes:
- AbstractShortComparator
- public interface ShortComparator
- extends Comparator
A type-specific Comparator
; provides methods to compare two primitive types both as objects
and as primitive types.
Note that fastutil
provides a corresponding abstract class that
can be used to implement this interface just by specifying the type-specific
comparator.
- See Also:
Comparator
Method Summary |
int |
compare(short k1,
short k2)
Compares the given primitive types. |
compare
public int compare(short k1,
short k2)
- Compares the given primitive types.
- 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