jdsl.core.ref
Class AbstractComparator
java.lang.Object
jdsl.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)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractComparator
public AbstractComparator()
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