All Packages Class Hierarchy This Package Previous Next Index
Interface rebelsky.util.Comparable
- public interface Comparable
An interface to support objects that we can compare.
- Version:
- 1.0 of February 1998
- Author:
- Samuel A. Rebelsky
Method Index
- o
lessThan(Comparable)
- Determine whether the current object is less than the parameter.
Methods
o
lessThan
public abstract boolean lessThan(Comparable other) throws IncomparableException
- Determine whether the current object is less than the parameter.
pre: The other object is of a "reasonable" class (one we
can reasonably expect to compare to the current object).
post: Returns true if the current object (this) is less than the
the parameter (other). Returns false if the current object
is equal to or greater than the other object.
- Throws: IncomparableException
- When the other object cannot reasonably be compared in this manner.
All Packages Class Hierarchy This Package Previous Next Index