Package com.ibm.icu.util
Class CaseInsensitiveString
- java.lang.Object
-
- com.ibm.icu.util.CaseInsensitiveString
-
public class CaseInsensitiveString extends java.lang.ObjectA 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(java.lang.String s)Constructs an CaseInsentiveString object from the given string
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Compare the object with thisjava.lang.StringgetString()returns the underlying stringinthashCode()Returns the hashCode of this objectjava.lang.StringtoString()Overrides superclass method
-
-
-
Method Detail
-
getString
public java.lang.String getString()
returns the underlying string- Returns:
- String
-
equals
public boolean equals(java.lang.Object o)
Compare the object with this- Overrides:
equalsin classjava.lang.Object- Parameters:
o- Object to compare this object with
-
hashCode
public int hashCode()
Returns the hashCode of this object- Overrides:
hashCodein classjava.lang.Object- Returns:
- int hashcode
-
toString
public java.lang.String toString()
Overrides superclass method- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of the object.
-
-