java.util
Class Collections.SynchronizedSet<E>
java.lang.Object
java.util.Collections.SynchronizedCollection<E>
java.util.Collections.SynchronizedSet<E>
- All Implemented Interfaces:
- Serializable, Iterable<E>, Collection<E>, Set<E>
- Direct Known Subclasses:
- Collections.SynchronizedSortedSet
- Enclosing class:
- Collections
static class Collections.SynchronizedSet<E>
- extends Collections.SynchronizedCollection<E>
- implements Set<E>
|
Method Summary |
boolean |
equals(Object object)
Compares the argument to the receiver, and returns true if they represent
the same object using a class specific comparison. |
int |
hashCode()
Returns an integer hash code for the receiver. |
| Methods inherited from class java.util.Collections.SynchronizedCollection |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
| Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Collections.SynchronizedSet
Collections.SynchronizedSet(Set<E> set)
Collections.SynchronizedSet
Collections.SynchronizedSet(Set<E> set,
Object mutex)
equals
public boolean equals(Object object)
- Description copied from class:
Object
- Compares the argument to the receiver, and returns true if they represent
the same object using a class specific comparison. The
implementation in Object returns true only if the argument is the exact
same object as the receiver (==).
- Specified by:
equals in interface Collection<E>- Specified by:
equals in interface Set<E>- Overrides:
equals in class Object
- Parameters:
object - Object the object to compare with this object.
- Returns:
- boolean
true if the object is the same as this
object false if it is different from this object. - See Also:
Object.hashCode()
hashCode
public int hashCode()
- Description copied from class:
Object
- Returns an integer hash code for the receiver. Any two objects which
answer
true when passed to .equals must
answer the same value for this method.
- Specified by:
hashCode in interface Collection<E>- Specified by:
hashCode in interface Set<E>- Overrides:
hashCode in class Object
- Returns:
- int the receiver's hash.
- See Also:
Object.equals(java.lang.Object)
Please submit a feedback, bug or feature