Interface Comparable
All Packages Class Hierarchy This Package Previous Next Index
Interface Comparable
public interface netscape.util.Comparable
{
/* Methods
*/
public abstract int compareTo(Object);
}
Interface implemented by objects to enable sorting algortithms to sort
collections of homogenous instances.
Methods
compareTo
public abstract int compareTo(Object other)
- Compares two objects. Returns -1 if "this < other", returns
1 if "this > other", and returns 0 if "this == other".
The other object must be the same type as this object, otherwise the
ClassCastException is thrown.
- Throws: ClassCastException
- The other object is not of the same type.
All Packages Class Hierarchy This Package Previous Next Index