Class TUnmodifiableCharSet

java.lang.Object
gnu.trove.impl.unmodifiable.TUnmodifiableCharCollection
gnu.trove.impl.unmodifiable.TUnmodifiableCharSet
All Implemented Interfaces:
TCharSet, TCharCollection, Serializable

public class TUnmodifiableCharSet extends TUnmodifiableCharCollection implements TCharSet, Serializable
See Also:
  • Constructor Details

    • TUnmodifiableCharSet

      public TUnmodifiableCharSet(TCharSet s)
  • Method Details

    • equals

      public boolean equals(Object o)
      Description copied from interface: TCharSet
      Compares the specified object with this set for equality. Returns true if the specified object is also a set, the two sets have the same size, and every member of the specified set is contained in this set (or equivalently, every member of this set is contained in the specified set). This definition ensures that the equals method works properly across different implementations of the set interface.
      Specified by:
      equals in interface TCharCollection
      Specified by:
      equals in interface TCharSet
      Overrides:
      equals in class Object
      Parameters:
      o - object to be compared for equality with this set
      Returns:
      true if the specified object is equal to this set
    • hashCode

      public int hashCode()
      Description copied from interface: TCharSet
      Returns the hash code value for this set. The hash code of a set is defined to be the sum of the hash codes of the elements in the set. This ensures that s1.equals(s2) implies that s1.hashCode()==s2.hashCode() for any two sets s1 and s2, as required by the general contract of Object.hashCode().
      Specified by:
      hashCode in interface TCharCollection
      Specified by:
      hashCode in interface TCharSet
      Overrides:
      hashCode in class Object
      Returns:
      the hash code value for this set
      See Also: