Package io.deephaven.web.shared.fu
Class IdentityHashSet<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<T>
io.deephaven.web.shared.fu.IdentityHashSet<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Set<T>
A set that internally wraps an IdentityHashMap.
Should be very fast for pooled objects, and completely wrong for different instances of Object which .equal() each
other.
Use only if you can guarantee type parameter T is a pooled object (TableHandle, JsTable, ClientTableState, etc.)
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
addAll, clear, containsAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
addAll, clear, containsAll, retainAll, spliterator, toArray, toArray
-
Constructor Details
-
IdentityHashSet
public IdentityHashSet() -
IdentityHashSet
-
-
Method Details
-
iterator
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceSet<T>- Specified by:
sizein classAbstractCollection<T>
-
add
- Specified by:
addin interfaceCollection<T>- Specified by:
addin interfaceSet<T>- Overrides:
addin classAbstractCollection<T>
-
remove
- Specified by:
removein interfaceCollection<T>- Specified by:
removein interfaceSet<T>- Overrides:
removein classAbstractCollection<T>
-
contains
- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceSet<T>- Overrides:
containsin classAbstractCollection<T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T>- Specified by:
isEmptyin interfaceSet<T>- Overrides:
isEmptyin classAbstractCollection<T>
-