public class StringIgnoreCaseKeyComparator extends java.lang.Object implements KeyComparator<java.lang.String>
Modifier and Type | Field and Description |
---|---|
static StringIgnoreCaseKeyComparator |
SINGLETON |
Constructor and Description |
---|
StringIgnoreCaseKeyComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.String o1,
java.lang.String o2) |
boolean |
equals(java.lang.String x,
java.lang.String y)
Compare two keys for equality.
|
int |
hash(java.lang.String k)
Get the hash code of a key.
|
public static final StringIgnoreCaseKeyComparator SINGLETON
public int hash(java.lang.String k)
KeyComparator
hash
in interface KeyComparator<java.lang.String>
k
- the key.public boolean equals(java.lang.String x, java.lang.String y)
KeyComparator
equals
in interface KeyComparator<java.lang.String>
x
- the first keyy
- the second keypublic int compare(java.lang.String o1, java.lang.String o2)
compare
in interface java.util.Comparator<java.lang.String>
Copyright © 2016 Oracle Corporation. All Rights Reserved.