Package com.sun.identity.common
Class CaseInsensitiveKey
- java.lang.Object
-
- com.sun.identity.common.CaseInsensitiveKey
-
- All Implemented Interfaces:
Serializable,Comparable<CaseInsensitiveKey>
public class CaseInsensitiveKey extends Object implements Serializable, Comparable<CaseInsensitiveKey>
String wrapper that returns a case insensitive hash code useful for case insensitive hashing in HashSet and HashMap. It is comparable so that a HashMap can order keys whose hash codes collide in a tree bin instead of scanning the whole bin on every insertion.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CaseInsensitiveKey(String key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(CaseInsensitiveKey o)booleanequals(Object o)inthashCode()StringtoString()
-
-
-
Constructor Detail
-
CaseInsensitiveKey
public CaseInsensitiveKey(String key)
-
-
Method Detail
-
compareTo
public int compareTo(CaseInsensitiveKey o)
- Specified by:
compareToin interfaceComparable<CaseInsensitiveKey>
-
-