Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class java.util.Collections.UnmodifiableSet

java.lang.Object
  |
  +--java.util.Collections.UnmodifiableCollection
        |
        +--java.util.Collections.UnmodifiableSet
Subclasses:
Collections.UnmodifiableMap.UnmodifiableEntrySet, Collections.UnmodifiableSortedSet

static class Collections.UnmodifiableSet
extends Collections.UnmodifiableCollection
implements Set, java.io.Serializable
See Also:
Serialized Form

Constructor Summary
Collections.UnmodifiableSet(Set s)
           
 
Method Summary
boolean equals(java.lang.Object o)
           
int hashCode()
           
 
Methods inherited from class java.util.Collections.UnmodifiableCollection
addAll, add, clear, containsAll, contains, isEmpty, iterator, removeAll, remove, retainAll, size, toArray, toArray
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

Collections.UnmodifiableSet

Collections.UnmodifiableSet(Set s)
Method Detail

equals

public boolean equals(java.lang.Object o)
Description copied from interface:
Compares the specified Object with this Set for equality. Returns true if the given object is also a Set, the two Sets have the same size, and every member of the given Set is contained in this Set. This ensures that the equals method works properly across different implementations of the Set interface.
Specified by:
equals in interface Set
Overrides:
equals in class java.lang.Object


hashCode

public int hashCode()
Description copied from interface:
Returns the hash code value for this Set. The hash code of a Set is defined to be the sum of the hashCodes of the elements in the Set, where the hashcode of a null element is defined to be zero. 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 Set
Overrides:
hashCode in class java.lang.Object


Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD