public abstract class AbstractCharComparator extends java.lang.Object implements CharComparator
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.
Comparator
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Character ok1,
java.lang.Character ok2) |
abstract int |
compare(char k1,
char k2)
Compares the given primitive types.
|
public int compare(java.lang.Character ok1, java.lang.Character ok2)
compare
in interface java.util.Comparator<java.lang.Character>
public abstract int compare(char k1, char k2)
CharComparator
compare
in interface CharComparator
Comparator