Package pal.util
Interface Comparator
-
public interface Comparator
interface for an object that can compare other objects for the purposes of ordering them. This interface is analogous to the Comparator interface in Java 1.2 and higher, and it should be superceded by the collections framework when PAL is moved to 1.2 or higher.- Version:
- $Id: Comparator.java,v 1.2 2001/07/13 14:39:13 korbinian Exp $
- Author:
- Alexei Drummond
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
compare(java.lang.Object o1, java.lang.Object o2)
Returns a number representing the ordering relationship that the two objects have.boolean
equals(java.lang.Object o1, java.lang.Object o2)
Returns true if the two objects are equal.
-
-
-
Method Detail
-
compare
int compare(java.lang.Object o1, java.lang.Object o2)
Returns a number representing the ordering relationship that the two objects have. A negative number indicates that the first object is "smaller" than the second object, a positive number means it is "larger" and zero indicates that the objects are equal.
-
equals
boolean equals(java.lang.Object o1, java.lang.Object o2)
Returns true if the two objects are equal.
-
-