Package io.deephaven.base
Class LowGarbageArraySet<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet<T>
io.deephaven.base.LowGarbageArraySet<T>
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,Set<T>
A very simple
Set
for small sets (uses linear time algorithms) that creates no garbage (except when
expanding). This set only has one Iterator
, which is reused. This set is not thread safe.
Note: This class extends HashSet
rather than Set
(or AbstractSet
) only because one of the
fields where we want to use it (sun.nio.ch.SelectorImpl#keys
) is (improperly) declared as a HashSet rather
than a Set.
- See Also:
-
Constructor Summary
-
Method Summary
Methods inherited from class java.util.HashSet
spliterator, toArray, toArray
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
LowGarbageArraySet
public LowGarbageArraySet()
-
-
Method Details
-
iterator
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
add
-
remove
-
clear
public void clear() -
clone
-