order
Interface Ordered


public abstract interface Ordered

An interface for ordered objects. A class that is to be used as a key in an ordered data structure (such as a treap) must implement this interface.

Version:
1.0, 22 April 1997
See Also:
Treap

Method Summary
 int compareTo(Ordered anotherOrderedObject)
          Compares two ordered objects.
 

Method Detail

compareTo

public int compareTo(Ordered anotherOrderedObject)
Compares two ordered objects. This function should implement a total order relation.
Parameters:
anotherOrderedObject - the ordered object to be compared
Returns:
the value 0 if this object equals the argument; a value less that 0 if this object is less than the argument; and a value larger than 0 if this object is greater than the argument.