All Packages Class Hierarchy This Package Previous Next Index
Class jdsl.core.ref.StringComparator
java.lang.Object
|
+----jdsl.core.ref.StringComparator
- public class StringComparator
- extends Object
- implements Comparator
Provides easy comparison of strings.
-
StringComparator()
-
-
isComparable(Object)
-
Tests if
o is a String and not null.
-
isEqualTo(Object, Object)
- Tests if two strings are equal.
-
isGreaterThan(Object, Object)
- Tests if a
String is greater than another
-
isGreaterThanOrEqualTo(Object, Object)
- Tests if a
String is greater than or equal to another
-
isLessThan(Object, Object)
- Tests if a
String is less than another
-
isLessThanOrEqualTo(Object, Object)
- Tests if a
String is greater than another
StringComparator
public StringComparator()
isComparable
public boolean isComparable(Object o)
- Tests if
o is a String and not null.
- Parameters:
- o - The object to be examined
- Returns:
-
true if o can be compared,
falseotherwise.
isEqualTo
public boolean isEqualTo(Object a,
Object b)
- Tests if two strings are equal.
- Returns:
-
true if the two strings are lexicographically
equivalent, false otherwise.
- Throws: InvalidKeyException
- if either parameter is either
null or not a String.
isGreaterThan
public boolean isGreaterThan(Object a,
Object b)
- Tests if a
String is greater than another
- Returns:
-
true if a lexicographically
greater than b, false otherwise.
- Throws: InvalidKeyException
- if either parameter is either
null or not a String.
isGreaterThanOrEqualTo
public boolean isGreaterThanOrEqualTo(Object a,
Object b)
- Tests if a
String is greater than or equal to another
- Returns:
-
true if a lexicographically
greater than or equal to b, false otherwise.
- Throws: InvalidKeyException
- if either parameter is either
null or not a String.
isLessThan
public boolean isLessThan(Object a,
Object b)
- Tests if a
String is less than another
- Returns:
-
true if a lexicographically
less than b, false otherwise.
- Throws: InvalidKeyException
- if either parameter is either
null or not a String.
isLessThanOrEqualTo
public boolean isLessThanOrEqualTo(Object a,
Object b)
- Tests if a
String is greater than another
- Returns:
-
true if a lexicographically
less than or equal to b, false otherwise.
- Throws: InvalidKeyException
- if either parameter is either
null or not a String.
All Packages Class Hierarchy This Package Previous Next Index