All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface rebelsky.util.NewComparable

public interface NewComparable
extends Comparable
An interface to support objects that we can compare.

Version:
1.0 of March 1998
Author:
Samuel A. Rebelsky

Method Index

o lessThan(Object)
Determine whether the current object is less than the parameter.

Methods

o lessThan
 public abstract boolean lessThan(Object 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