public class KeyComparator
extends java.lang.Object
implements java.util.Comparator
KeyComparator
class compares two array elements.Constructor and Description |
---|
KeyComparator()
The constructor
KeyComparator creates a new instance(object) of the class. |
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Object e1,
java.lang.Object e2)
The method
compare compares the keys of two KeyElements objects. |
public KeyComparator()
KeyComparator
creates a new instance(object) of the class.public int compare(java.lang.Object e1, java.lang.Object e2)
compare
compares the keys of two KeyElements objects.compare
in interface java.util.Comparator
e1
- KeyElement.e2
- KeyElement.