public interface Ordered
An set of elements S is partially ordered
if and only if e1.compare(e2)==0
implies that
e1.equals(e2)
for every e1 and e2 in S.
This all goes away in JDK 1.2.
For use with java.lang.Comparable from JDK 1.2:
public int compare (Object o1, Object o2) { return (((Ordered)o1).compare (o2)); }
Sort
int compare(java.lang.Object that)
that
- The object to compare this object against.