jdsl.core.ref
Class IntegerComparator
java.lang.Object
|
+--jdsl.core.ref.IntegerComparator
- public class IntegerComparator
- extends java.lang.Object
- implements Comparator
A comparator that compares integers.
- Author:
- Lubomir Bourdev, Ryan Shaun Baker, Mike Boilen (mgb)
|
Method Summary |
boolean |
isComparable(java.lang.Object x)
Tests if an Object can be compared by this comparator. |
boolean |
isEqualTo(java.lang.Object x1,
java.lang.Object x2)
Tests if one Integer is equal to another. |
boolean |
isGreaterThan(java.lang.Object x1,
java.lang.Object x2)
Tests if one Integer is greater than another. |
boolean |
isGreaterThanOrEqualTo(java.lang.Object x1,
java.lang.Object x2)
Tests if one Integer is greater than or equal to another. |
boolean |
isLessThan(java.lang.Object x1,
java.lang.Object x2)
Tests if one Integer is less than another. |
boolean |
isLessThanOrEqualTo(java.lang.Object x1,
java.lang.Object x2)
Tests if one Integer is less than or equal to another. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
IntegerComparator
public IntegerComparator()
isGreaterThan
public boolean isGreaterThan(java.lang.Object x1,
java.lang.Object x2)
throws InvalidElementException
- Tests if one
Integer is greater than another.
- Specified by:
- isGreaterThan in interface Comparator
- Returns:
- true if
x1 is greater than x2 - Throws:
- InvalidElementException - if either parameter is not an
Integer
isLessThan
public boolean isLessThan(java.lang.Object x1,
java.lang.Object x2)
throws InvalidElementException
- Tests if one
Integer is less than another.
- Specified by:
- isLessThan in interface Comparator
- Returns:
- true if
x1 is less than x2 - Throws:
- InvalidElementException - if either parameter is not an
Integer
isEqualTo
public boolean isEqualTo(java.lang.Object x1,
java.lang.Object x2)
throws InvalidElementException
- Tests if one
Integer is equal to another.
- Specified by:
- isEqualTo in interface Comparator
- Returns:
- true if
x1 is equal to x2 - Throws:
- InvalidElementException - if either parameter is not an
Integer
isGreaterThanOrEqualTo
public boolean isGreaterThanOrEqualTo(java.lang.Object x1,
java.lang.Object x2)
throws InvalidElementException
- Tests if one
Integer is greater than or equal to another.
- Specified by:
- isGreaterThanOrEqualTo in interface Comparator
- Returns:
- true if
x1 is greater than or equal to
x2 @exception InvalidElementException if either parameter
is not an Integer
isLessThanOrEqualTo
public boolean isLessThanOrEqualTo(java.lang.Object x1,
java.lang.Object x2)
throws InvalidElementException
- Tests if one
Integer is less than or equal to another.
- Specified by:
- isLessThanOrEqualTo in interface Comparator
- Returns:
- true if
x1 is less than or equal to
x2 @exception InvalidElementException if either parameter
is not an Integer
isComparable
public boolean isComparable(java.lang.Object x)
- Tests if an Object can be compared by this comparator.
- Specified by:
- isComparable in interface Comparator