jdsl.core.ref
Class AbstractComparator

java.lang.Object
  extended byjdsl.core.ref.AbstractComparator
Direct Known Subclasses:
ComparableComparator, ComparatorExtender, ComparatorReverser, IntegerComparator

public abstract class AbstractComparator
extends Object

An abstract class implementing some methods of the Comparator interface.

Version:
JDSL 2.1.1
Author:
Luca Vismara (lv)

Constructor Summary
AbstractComparator()
           
 
Method Summary
abstract  int compare(Object a, Object b)
           
 boolean isEqualTo(Object a, Object b)
           
 boolean isGreaterThan(Object a, Object b)
           
 boolean isGreaterThanOrEqualTo(Object a, Object b)
           
 boolean isLessThan(Object a, Object b)
           
 boolean isLessThanOrEqualTo(Object a, Object b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractComparator

public AbstractComparator()
Method Detail

compare

public abstract int compare(Object a,
                            Object b)
                     throws ClassCastException
Returns:
a negative value if a < b, zero if a == b, and a positive value if a > b
Throws:
ClassCastException

isGreaterThan

public boolean isGreaterThan(Object a,
                             Object b)
                      throws ClassCastException
Throws:
ClassCastException

isLessThan

public boolean isLessThan(Object a,
                          Object b)
                   throws ClassCastException
Throws:
ClassCastException

isEqualTo

public boolean isEqualTo(Object a,
                         Object b)
                  throws ClassCastException
Throws:
ClassCastException

isGreaterThanOrEqualTo

public boolean isGreaterThanOrEqualTo(Object a,
                                      Object b)
                               throws ClassCastException
Throws:
ClassCastException

isLessThanOrEqualTo

public boolean isLessThanOrEqualTo(Object a,
                                   Object b)
                            throws ClassCastException
Throws:
ClassCastException