ConcurrentHashMap.newKeySet() instead.@Deprecated public class ConcurrentHashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable, Serializable
Set interface, backed by a ConcurrentHashMap instance.| Constructor and Description |
|---|
ConcurrentHashSet()
Deprecated.
Constructs a new, empty set; the backing
ConcurrentHashMap instance has
default initial capacity (16) and load factor (0.75). |
ConcurrentHashSet(Collection<? extends E> c)
Deprecated.
Constructs a new set containing the elements in the specified
collection.
|
ConcurrentHashSet(int initialCapacity)
Deprecated.
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)
Deprecated.
Constructs a new, empty set; the backing
ConcurrentHashMap instance has
the specified initial capacity and the specified load factor. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E o)
Deprecated.
|
void |
clear()
Deprecated.
|
Object |
clone()
Deprecated.
|
boolean |
contains(Object o)
Deprecated.
|
boolean |
isEmpty()
Deprecated.
|
Iterator<E> |
iterator()
Deprecated.
|
boolean |
remove(Object o)
Deprecated.
|
int |
size()
Deprecated.
|
equals, hashCode, removeAlladdAll, containsAll, retainAll, toArray, toArray, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAll, equals, hashCode, removeAll, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, streampublic ConcurrentHashSet()
ConcurrentHashMap instance has
default initial capacity (16) and load factor (0.75).public ConcurrentHashSet(Collection<? extends E> c)
ConcurrentHashMap is created with default load factor
(0.75) and an initial capacity sufficient to contain the elements in
the specified collection.c - the collection whose elements are to be placed into this set.NullPointerException - if the specified collection is null.public ConcurrentHashSet(int initialCapacity,
float loadFactor)
ConcurrentHashMap instance has
the specified initial capacity and the specified load factor.initialCapacity - the initial capacity of the hash map.loadFactor - the load factor of the hash map.IllegalArgumentException - if the initial capacity is less
than zero, or if the load factor is nonpositive.public ConcurrentHashSet(int initialCapacity)
HashMap instance has
the specified initial capacity and default load factor, which is
0.75.initialCapacity - the initial capacity of the hash table.IllegalArgumentException - if the initial capacity is less
than zero.public int size()
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface Set<E>isEmpty in class AbstractCollection<E>public boolean contains(Object o)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractCollection<E>public boolean add(E o)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>public boolean remove(Object o)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractCollection<E>Copyright © 2003–2019 Ignite Realtime. All rights reserved.