public class IdentityHashSet<E> extends MapBackedSetBase<E>
IdentityHashMap
. This class can be e.g. used to implement
listener lists that should not rely on the listeners
equals()
-methods.
The implementation is based on class HashSet
that also uses
an underlying hash map.
Constructor and Description |
---|
IdentityHashSet() |
IdentityHashSet(java.util.Collection<? extends E> collection)
Create new identity hash set from an existing collection.
|
IdentityHashSet(int expectedMaxSize)
Create new identity hash set with an expected maximum size.
|
Modifier and Type | Method and Description |
---|---|
IdentityHashSet<E> |
clone()
Returns a shallow copy of this IdentityHashSet instance: the
elements themselves are not cloned.
|
add, clear, contains, isEmpty, iterator, remove, size
addAll, containsAll, retainAll, toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
public IdentityHashSet()
public IdentityHashSet(java.util.Collection<? extends E> collection)
public IdentityHashSet(int expectedMaxSize)
public IdentityHashSet<E> clone()
clone
in class java.lang.Object