Class StringIgnoreCaseKeyComparator
- java.lang.Object
-
- org.glassfish.jersey.internal.util.collection.StringIgnoreCaseKeyComparator
-
- All Implemented Interfaces:
Serializable,KeyComparator<String>
public class StringIgnoreCaseKeyComparator extends Object implements KeyComparator<String>
Case insensitive String key comparator.- Author:
- Paul Sandoz, Michal Gajdos
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringIgnoreCaseKeyComparatorSINGLETON
-
Constructor Summary
Constructors Constructor Description StringIgnoreCaseKeyComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(String x, String y)Compare two keys for equality.inthash(String k)Get the hash code of a key.
-
-
-
Field Detail
-
SINGLETON
public static final StringIgnoreCaseKeyComparator SINGLETON
-
-
Method Detail
-
hash
public int hash(String k)
Description copied from interface:KeyComparatorGet the hash code of a key.- Specified by:
hashin interfaceKeyComparator<String>- Parameters:
k- the key.- Returns:
- the hash code of the key.
-
equals
public boolean equals(String x, String y)
Description copied from interface:KeyComparatorCompare two keys for equality.- Specified by:
equalsin interfaceKeyComparator<String>- Parameters:
x- the first keyy- the second key- Returns:
- true if the keys are equal.
-
-