Interface order.Ordered
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface order.Ordered

public interface Ordered
extends Object
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 Index

 o compareTo(Ordered)
Compares two ordered objects.

Methods

 o compareTo
  public abstract 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.

All Packages  Class Hierarchy  This Package  Previous  Next  Index