Package com.ibm.icu.util
Class CaseInsensitiveString
- java.lang.Object
-
- com.ibm.icu.util.CaseInsensitiveString
-
public class CaseInsensitiveString extends Object
A string used as a key in java.util.Hashtable and other collections. It retains case information, but its equals() and hashCode() methods ignore case.
-
-
Constructor Summary
Constructors Constructor Description CaseInsensitiveString(String s)Constructs an CaseInsentiveString object from the given string
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Compare the object with thisStringgetString()returns the underlying stringinthashCode()Returns the hashCode of this objectStringtoString()Overrides superclass method
-
-
-
Constructor Detail
-
CaseInsensitiveString
public CaseInsensitiveString(String s)
Constructs an CaseInsentiveString object from the given string- Parameters:
s- The string to construct this object from
-
-
Method Detail
-
getString
public String getString()
returns the underlying string- Returns:
- String
-
equals
public boolean equals(Object o)
Compare the object with this- Overrides:
equalsin classObject- Parameters:
o- Object to compare this object with- Returns:
trueif the specified object is equal to thisObject;falseotherwise.- See Also:
Object.hashCode()
-
hashCode
public int hashCode()
Returns the hashCode of this object- Overrides:
hashCodein classObject- Returns:
- int hashcode
- See Also:
Object.equals(java.lang.Object)
-
-