Top Description Fields Constructors Methods
com.ibm.icu.util

public Class CaseInsensitiveString

extends Object
Class Inheritance
Imports
com.ibm.icu.lang.UCharacter

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.
ICU Status
Stable since ICU 2.0.

Field Summary

Modifier and TypeField and Description
private String
private int
private String

Constructor Summary

AccessConstructor and Description
public
CaseInsensitiveString(String
The string to construct this object from
s
)

Constructs an CaseInsentiveString object from the given string

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
Object to compare this object with
o
)

Overrides java.lang.Object.equals.

Compare the object with this
private static String
foldCase(String foldee)

private void
public String

Returns:

String
getString
()

returns the underlying string

public int

Returns:

int hashcode
hashCode
()

Overrides java.lang.Object.hashCode.

Returns the hashCode of this object
public String

Returns:

a string representation of the object.
toString
()

Overrides java.lang.Object.toString.

Overrides superclass method
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

foldedback to summary
private String folded
hashback to summary
private int hash
stringback to summary
private String string

Constructor Detail

CaseInsensitiveStringback to summary
public CaseInsensitiveString(String s)

Constructs an CaseInsentiveString object from the given string

Parameters
s:String

The string to construct this object from

ICU Status
Stable since ICU 2.0.

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Compare the object with this

Parameters
o:Object

Object to compare this object with

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
ICU Status
Stable since ICU 2.0.
foldCaseback to summary
private static String foldCase(String foldee)
getFoldedback to summary
private void getFolded()
getStringback to summary
public String getString()

returns the underlying string

Returns:String

String

ICU Status
Stable since ICU 2.0.
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hashCode of this object

Returns:int

int hashcode

Annotations
@Override
ICU Status
Stable since ICU 2.0.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Overrides superclass method

Returns:String

a string representation of the object.

Annotations
@Override
ICU Status
Stable since ICU 2.0.