All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sdsu.compare.FloatComparer

java.lang.Object
   |
   +----sdsu.compare.Comparer
           |
           +----sdsu.compare.FloatComparer

public class FloatComparer
extends Comparer
A concrete class for comparing Numeric objects which contain values that can be converted to a float.

Author:
Roger Whitney (whitney@cs.sdsu.edu)

Method Index

 o equals(Object, Object)
Returns true if the leftOperand is equal to the rightOperand.
 o getInstance()
Returns a FloatComparer object.
 o greaterThan(Object, Object)
Returns true if the leftOperand is greater than the rightOperand.
 o lessThan(Object, Object)
Returns true if the leftOperand is less than the rightOperand.

Methods

 o getInstance
 public static Comparer getInstance()
Returns a FloatComparer object.

 o lessThan
 public final boolean lessThan(Object leftOperand,
                               Object rightOperand) throws ClassCastException
Returns true if the leftOperand is less than the rightOperand.

Throws: ClassCastException
If operand objects are not Number objects. ClassCastException is a RuntimeException, so compiler does not force you to catch this exception.
Overrides:
lessThan in class Comparer
 o greaterThan
 public final boolean greaterThan(Object leftOperand,
                                  Object rightOperand) throws ClassCastException
Returns true if the leftOperand is greater than the rightOperand.

Throws: ClassCastException
If operand objects are not Number objects. ClassCastException is a RuntimeException, so compiler does not force you to catch this exception.
Overrides:
greaterThan in class Comparer
 o equals
 public final boolean equals(Object leftOperand,
                             Object rightOperand) throws ClassCastException
Returns true if the leftOperand is equal to the rightOperand.

Throws: ClassCastException
If operand objects are not Number objects. ClassCastException is a RuntimeException, so compiler does not force you to catch this exception.
Overrides:
equals in class Comparer

All Packages  Class Hierarchy  This Package  Previous  Next  Index