com.ibm.icu.util
Class CaseInsensitiveString

java.lang.Object
  extended by 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.

Status:
Stable ICU 2.0.

Constructor Summary
CaseInsensitiveString(String s)
          Constructs an CaseInsentiveString object from the given string
 
Method Summary
 boolean equals(Object o)
          Compare the object with this
 String getString()
          returns the underlying string
 int hashCode()
          Returns the hashCode of this object
 String toString()
          Overrides superclass method
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CaseInsensitiveString

public CaseInsensitiveString(String s)
Constructs an CaseInsentiveString object from the given string

Parameters:
s - The string to construct this object from
Status:
Stable ICU 2.0.
Method Detail

getString

public String getString()
returns the underlying string

Returns:
String
Status:
Stable ICU 2.0.

equals

public boolean equals(Object o)
Compare the object with this

Overrides:
equals in class Object
Parameters:
o - Object to compare this object with
Status:
Stable ICU 2.0.

hashCode

public int hashCode()
Returns the hashCode of this object

Overrides:
hashCode in class Object
Returns:
int hashcode
Status:
Stable ICU 2.0.

toString

public String toString()
Overrides superclass method

Overrides:
toString in class Object
Status:
Stable ICU 3.6.


Copyright (c) 2011 IBM Corporation and others.