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.


Constructor Index

 o StringComparator()

Method Index

 o isComparable(Object)
Tests if o is a String and not null.
 o isEqualTo(Object, Object)
Tests if two strings are equal.
 o isGreaterThan(Object, Object)
Tests if a String is greater than another
 o isGreaterThanOrEqualTo(Object, Object)
Tests if a String is greater than or equal to another
 o isLessThan(Object, Object)
Tests if a String is less than another
 o isLessThanOrEqualTo(Object, Object)
Tests if a String is greater than another

Constructors

 o StringComparator
 public StringComparator()

Methods

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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