com.ibm.icu.util

Class 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

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

Constructor Details

CaseInsensitiveString

public CaseInsensitiveString(String s)
Constructs an CaseInsentiveString object from the given string
Parameters:
s - The string to construct this object from

Method Details

equals

public boolean equals(Object o)
Compare the object with this
Parameters:
o - Object to compare this object with

getString

public String getString()
returns the underlying string
Returns:
String

hashCode

public int hashCode()
Returns the hashCode of this object
Returns:
int hashcode

Copyright (c) 2006 IBM Corporation and others.