E - the element typepublic class ConcurrentSet<E> extends MapDelegateSet<E> implements Serializable
| Constructor and Description |
|---|
ConcurrentSet()
Constructs a new, empty set; the backing ConcurrentHashMap instance has
default initial capacity (16) and load factor (0.75).
|
ConcurrentSet(Collection<? extends E> c)
Constructs a new set containing the elements in the specified
collection.
|
ConcurrentSet(int initialCapacity)
Constructs a new, empty set; the backing ConcurrentHashMap instance has
the specified initial capacity and default load factor, which is
0.75.
|
ConcurrentSet(int initialCapacity,
float loadFactor,
int concurrencyLevel)
Constructs a new, empty set; the backing ConcurrentHashMap instance has
the specified initial capacity and the specified load factor.
|
add, clear, contains, isEmpty, iterator, remove, size, toStringequals, hashCode, removeAlladdAll, containsAll, retainAll, toArray, toArraypublic ConcurrentSet()
public ConcurrentSet(Collection<? extends E> c)
c - the collection whose elements are to be placed into this set.NullPointerException - if the specified collection is null.public ConcurrentSet(int initialCapacity,
float loadFactor,
int concurrencyLevel)
initialCapacity - the initial capacity. The implementation
performs internal sizing to accommodate this many elements.loadFactor - the load factor threshold, used to control resizing.
Resizing may be performed when the average number of elements per
bin exceeds this threshold.concurrencyLevel - the estimated number of concurrently
updating threads. The implementation performs internal sizing
to try to accommodate this many threads.IllegalArgumentException - if the initial capacity is less
than zero, or if the load factor is nonpositive.public ConcurrentSet(int initialCapacity)
initialCapacity - the initial capacity of the hash table.IllegalArgumentException - if the initial capacity is less
than zero.Copyright © 2015 JBoss by Red Hat. All rights reserved.