jds.util
Interface Comparator
- public abstract interface Comparator
- extends java.io.Serializable
Comparator - place two objects in order;
for use with book
Classic Data Structures
in Java
by Timothy A Budd,
published by Addison-Wesley, 2001.
- See Also:
Serializable
Fields inherited from class java.io.Serializable |
serialVersionUID |
Method Summary |
int |
compare(java.lang.Object left,
java.lang.Object right)
determine order of two object; -1, 0 or 1 |
compare
public int compare(java.lang.Object left,
java.lang.Object right)
- determine order of two object; -1, 0 or 1
- Parameters:
left
- first objectright
- second object- Returns:
- -1 if left less than right, 0 if equal, 1 otherwise