Class Overview
Implements a locale and case insensitive comparator suitable for
strings that are known to only contain ASCII characters. Some
tables internal to the JDK contain only ASCII data and are using
the "generalized" java.lang.String case-insensitive comparator
which converts each character to both upper and lower case.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
From interface
java.util.Comparator
abstract
int
|
compare(T o1, T o2)
Compares its two arguments for order.
|
abstract
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this
comparator.
|
|
Fields
Public Constructors
public
ASCIICaseInsensitiveComparator
()
Public Methods
public
static
int
lowerCaseHashCode
(String s)
A case insensitive hash code method to go with the case insensitive
compare() method.
Returns a hash code for this ASCII string as if it were lower case.
returns same answer as:
s.toLowerCase(Locale.US).hashCode();
but does not allocate memory (it does NOT have the special
case Turkish rules).
Parameters
s
| a String to compute the hashcode on. |
Returns
- a hash code value for this object.