Package com.pnfsoftware.jeb.util.collect
Class IdentityHashSet<E>
java.lang.Object
com.pnfsoftware.jeb.util.collect.IdentityHashSet<E>
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,Set<E>
The
set
version of an IdentityHashMap
. Concurrency friendly.-
Constructor Summary
ConstructorsConstructorDescriptionIdentityHashSet
(int expectedMaxSize) IdentityHashSet
(Collection<? extends E> c) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends E> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) boolean
int
hashCode()
boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) Semantics is changed.int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.Set
spliterator
-
Constructor Details
-
IdentityHashSet
public IdentityHashSet() -
IdentityHashSet
public IdentityHashSet(int expectedMaxSize) -
IdentityHashSet
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
clear
public void clear() -
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
add
-
remove
-
addAll
-
removeAll
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in interfaceSet<E>
-
retainAll
Semantics is changed. -
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
toString
-