    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class sdsu.compare.LongComparer

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

public class LongComparer
extends Comparer

A concrete class for comparing Numeric objects which contain values that can be converted to a long.

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

##

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

##

getInstance

     public static Comparer getInstance()

  Returns a LongComparer object.

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

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

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