pal.util
Interface Comparable

All Known Implementing Classes:
ComparableDouble, Identifier

public interface Comparable

interface for an object that is comparable. This interface is analogous to the Comparable interface in Java 1.2, and it should be superceded by the JDK 1.2 collections framework when PAL is moved to 1.2.

Version:
$Id: Comparable.java,v 1.2 2001/07/13 14:39:13 korbinian Exp $
Author:
Alexei Drummond

Method Summary
 int compareTo(java.lang.Object o)
          Returns a number representing the ordering relationship that the object has with the given object.
 boolean equals(java.lang.Object o)
          Returns true if this object is equal to the given object.
 

Method Detail

compareTo

int compareTo(java.lang.Object o)
Returns a number representing the ordering relationship that the object has with the given object. A negative number indicates that the object is "smaller" than the parameter, a positive number means it is "larger" and zero indicates that the objects are equal.


equals

boolean equals(java.lang.Object o)
Returns true if this object is equal to the given object.

Overrides:
equals in class java.lang.Object