|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractSet<E> org.apache.wicket.util.collections.ConcurrentHashSet<E>
E
- public class ConcurrentHashSet<E>
This class implements the Set interface, backed by a ConcurrentHashMap instance.
Constructor Summary | |
---|---|
ConcurrentHashSet()
Constructs a new, empty set; the backing ConcurrentHashMap instance has default initial capacity (16) and load factor (0.75). |
|
ConcurrentHashSet(java.util.Collection<? extends E> c)
Constructs a new set containing the elements in the specified collection. |
|
ConcurrentHashSet(int initialCapacity)
Constructs a new, empty set; the backing HashMap instance has the specified initial capacity and default load factor, which is 0.75. |
|
ConcurrentHashSet(int initialCapacity,
float loadFactor)
Constructs a new, empty set; the backing ConcurrentHashMap instance has the specified initial capacity and the specified load factor. |
Method Summary | |
---|---|
boolean |
add(E o)
|
void |
clear()
|
java.lang.Object |
clone()
|
boolean |
contains(java.lang.Object o)
|
boolean |
isEmpty()
|
java.util.Iterator<E> |
iterator()
|
boolean |
remove(java.lang.Object o)
|
int |
size()
|
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, containsAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public ConcurrentHashSet()
public ConcurrentHashSet(java.util.Collection<? extends E> c)
c
- the collection whose elements are to be placed into this set.
java.lang.NullPointerException
- if the specified collection is null.public ConcurrentHashSet(int initialCapacity, float loadFactor)
initialCapacity
- the initial capacity of the hash map.loadFactor
- the load factor of the hash map.
java.lang.IllegalArgumentException
- if the initial capacity is less than zero, or if the load factor is nonpositive.public ConcurrentHashSet(int initialCapacity)
initialCapacity
- the initial capacity of the hash table.
java.lang.IllegalArgumentException
- if the initial capacity is less than zero.Method Detail |
---|
public java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E>
iterator
in interface java.util.Collection<E>
iterator
in interface java.util.Set<E>
iterator
in class java.util.AbstractCollection<E>
public int size()
size
in interface java.util.Collection<E>
size
in interface java.util.Set<E>
size
in class java.util.AbstractCollection<E>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<E>
isEmpty
in interface java.util.Set<E>
isEmpty
in class java.util.AbstractCollection<E>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<E>
contains
in interface java.util.Set<E>
contains
in class java.util.AbstractCollection<E>
public boolean add(E o)
add
in interface java.util.Collection<E>
add
in interface java.util.Set<E>
add
in class java.util.AbstractCollection<E>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<E>
remove
in interface java.util.Set<E>
remove
in class java.util.AbstractCollection<E>
public void clear()
clear
in interface java.util.Collection<E>
clear
in interface java.util.Set<E>
clear
in class java.util.AbstractCollection<E>
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |