All Packages Class Hierarchy This Package Previous Next Index
Interface jdsl.core.api.Comparator
- public interface Comparator
A comparator does comparisons of objects in the universe the comparator
is defined over.
A comparator throws an InvalidElementException if passed a null element, or
an element outside of its universe.
- Version:
- Mon Aug 11 14:57:22 EDT 1997
- Author:
- Mark Handy
-
isComparable(Object)
-
Tests whether this comparator can compare this object
-
isEqualTo(Object, Object)
-
Tests equality of two objects in the universe over which this
comparator is defined.
-
isGreaterThan(Object, Object)
-
Tests strict order of two objects in the universe over which this
comparator is defined.
-
isGreaterThanOrEqualTo(Object, Object)
-
Tests non-strict order of two objects in the universe over which this
comparator is defined.
-
isLessThan(Object, Object)
-
Tests strict order of two objects in the universe over which this
comparator is defined.
-
isLessThanOrEqualTo(Object, Object)
-
Tests non-strict order of two objects in the universe over which this
comparator is defined.
isEqualTo
public abstract boolean isEqualTo(Object a,
Object b) throws InvalidElementException
- Tests equality of two objects in the universe over which this
comparator is defined.
- Returns:
- whether a is equal to b
isGreaterThan
public abstract boolean isGreaterThan(Object a,
Object b) throws InvalidElementException
- Tests strict order of two objects in the universe over which this
comparator is defined.
- Returns:
- whether a is greater than b
isLessThan
public abstract boolean isLessThan(Object a,
Object b) throws InvalidElementException
- Tests strict order of two objects in the universe over which this
comparator is defined.
- Returns:
- whether a is less than b
isGreaterThanOrEqualTo
public abstract boolean isGreaterThanOrEqualTo(Object a,
Object b) throws InvalidElementException
- Tests non-strict order of two objects in the universe over which this
comparator is defined.
- Returns:
- whether a is greater than or equal to b
isLessThanOrEqualTo
public abstract boolean isLessThanOrEqualTo(Object a,
Object b) throws InvalidElementException
- Tests non-strict order of two objects in the universe over which this
comparator is defined.
- Returns:
- whether a is less than or equal to b
isComparable
public abstract boolean isComparable(Object a)
- Tests whether this comparator can compare this object
- Returns:
- whether a can be compared to other objects using this comparator
All Packages Class Hierarchy This Package Previous Next Index