sdsu.compare
Class LinearOrderComparer
java.lang.Object
|
+--sdsu.compare.Comparer
|
+--sdsu.compare.LinearOrderComparer
- public abstract class LinearOrderComparer
- extends Comparer
A abstract class for comparing Linear ordered objects (Numeric).
Subclass needs to implement equal, lessThan, greaterThan.
- See Also:
- Serialized Form
Method Summary |
int |
compare(java.lang.Object leftOperand,
java.lang.Object rightOperand)
Returns an integer that is less than, equal to,
or greater than zero. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
LinearOrderComparer
public LinearOrderComparer()
compare
public final int compare(java.lang.Object leftOperand,
java.lang.Object rightOperand)
throws java.lang.ClassCastException
- Returns an integer that is less than, equal to,
or greater than zero. The integer's value depends on whether
leftOperand is less than, equal to, or greater than rightOperand.
- Throws:
- java.lang.ClassCastException - If operand objects are not proper type.
ClassCastException is a RuntimeException, so compiler does not force you
to catch this exception.