|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.util.ConcurrentHashSet
A HashSet that can be accessed and modified from multiple threads.
Constructor Summary | |
ConcurrentHashSet()
Constructs a new ConcurrentHashSet |
Method Summary | |
boolean |
add(java.lang.Object obj)
Adds the specified element to this set if it is not already present. |
boolean |
addAll(java.util.Collection c)
Adds all of the elements in the specified collection to this set if they're not already present (optional operation). |
void |
clear()
Removes all the elements from the set. |
boolean |
contains(java.lang.Object obj)
Returns true if the map contains the specified object. |
boolean |
containsAll(java.util.Collection c)
Returns true if the set contains all of the elements of the specified collection. |
boolean |
equals(java.lang.Object obj)
Returns true if these sets are equal. |
int |
hashCode()
Returns the hash code value for this set. |
boolean |
isEmpty()
Returns true if this set contains no elements. |
java.util.Iterator |
iterator()
Returns an iterator over the elements of this set. |
static void |
main(java.lang.String[] args)
Tests the operation of the set. |
boolean |
remove(java.lang.Object obj)
Removes an object from the set. |
boolean |
removeAll(java.util.Collection c)
Removes from this set all of its elements that are contains in the specified collection. |
boolean |
retainAll(java.util.Collection c)
Retains only the elements in this set that are contained in the specified collection. |
int |
size()
Returns the number of elements in this set (its cardinality) |
java.lang.Object[] |
toArray()
Returns an array containing a snapshot of the elements of the set at some point in time while the array is being constructed. |
java.lang.Object[] |
toArray(java.lang.Object[] a)
Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array. |
java.lang.String |
toString()
Returns debugging representation of this set. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ConcurrentHashSet()
Method Detail |
public boolean add(java.lang.Object obj)
add
in interface java.util.Set
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Set
public void clear()
clear
in interface java.util.Set
public boolean contains(java.lang.Object obj)
contains
in interface java.util.Set
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Set
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Set
public int hashCode()
hashCode
in interface java.util.Set
public boolean isEmpty()
isEmpty
in interface java.util.Set
public java.util.Iterator iterator()
iterator
in interface java.util.Set
public boolean remove(java.lang.Object obj)
remove
in interface java.util.Set
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Set
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Set
public int size()
size
in interface java.util.Set
public java.lang.Object[] toArray()
toArray
in interface java.util.Set
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Set
public java.lang.String toString()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |