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