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.
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. |
compareTo
public 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
public boolean equals(java.lang.Object o)
- Returns true if this object is equal to the given object.
- Overrides:
equals
in class java.lang.Object