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 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

    • getString

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

      public boolean equals(Object o)
      Compare the object with this
      Overrides:
      equals in class Object
      Parameters:
      o - Object to compare this object with
    • hashCode

      public int hashCode()
      Returns the hashCode of this object
      Overrides:
      hashCode in class Object
      Returns:
      int hashcode
    • toString

      public String toString()
      Overrides superclass method
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object.