| org.jivesoftware.util.ConcurrentHashSet
ConcurrentHashSet | public class ConcurrentHashSet extends AbstractSet implements Set<E>,Cloneable,java.io.Serializable(Code) | | This class implements the Set interface, backed by a ConcurrentHashMap instance.
author: Matt Tucker |
Constructor Summary | |
public | ConcurrentHashSet() Constructs a new, empty set; the backing ConcurrentHashMap instance has
default initial capacity (16) and load factor (0.75). | public | ConcurrentHashSet(Collection<? extends E> c) Constructs a new set containing the elements in the specified
collection. | public | ConcurrentHashSet(int initialCapacity, float loadFactor) Constructs a new, empty set; the backing ConcurrentHashMap instance has
the specified initial capacity and the specified load factor. | public | 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 | public ConcurrentHashSet()(Code) | | Constructs a new, empty set; the backing ConcurrentHashMap instance has
default initial capacity (16) and load factor (0.75).
|
ConcurrentHashSet | public ConcurrentHashSet(Collection<? extends E> c)(Code) | | Constructs a new set containing the elements in the specified
collection. The ConcurrentHashMap is created with default load factor
(0.75) and an initial capacity sufficient to contain the elements in
the specified collection.
Parameters: c - the collection whose elements are to be placed into this set. throws: NullPointerException - if the specified collection is null. |
ConcurrentHashSet | public ConcurrentHashSet(int initialCapacity, float loadFactor)(Code) | | Constructs a new, empty set; the backing ConcurrentHashMap instance has
the specified initial capacity and the specified load factor.
Parameters: initialCapacity - the initial capacity of the hash map. Parameters: loadFactor - the load factor of the hash map. throws: IllegalArgumentException - if the initial capacity is lessthan zero, or if the load factor is nonpositive. |
ConcurrentHashSet | public ConcurrentHashSet(int initialCapacity)(Code) | | Constructs a new, empty set; the backing HashMap instance has
the specified initial capacity and default load factor, which is
0.75.
Parameters: initialCapacity - the initial capacity of the hash table. throws: IllegalArgumentException - if the initial capacity is lessthan zero. |
add | public boolean add(E o)(Code) | | |
clear | public void clear()(Code) | | |
isEmpty | public boolean isEmpty()(Code) | | |
|
|