E
- The element type.@NotThreadSafe
public class IdentityHashSet<E>
extends AbstractSet<E>
Similar in role to the IdentityHashMap, implements the Set interface using reference equality instead of object equality.
Constructor and Description |
---|
IdentityHashSet()
Constructs an instance.
|
IdentityHashSet(Collection<E> collection)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E object) |
void |
clear() |
boolean |
contains(Object object) |
Iterator<E> |
iterator() |
boolean |
remove(Object object) |
int |
size() |
addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString
public IdentityHashSet()
public IdentityHashSet(@Nonnull Collection<E> collection)
collection
- Initial content.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.