Package pascal.taie.util.collection
Class IndexableSet<E extends Indexable>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
pascal.taie.util.collection.AbstractSetEx<E>
pascal.taie.util.collection.IndexableSet<E>
- Type Parameters:
E
- type of elements whose indexes are stored in this set
An efficient set implementation for
Indexable
objects.
NOTE: this set is not a fully-functional set.
It does not actually store the elements (it only stores the indexes),
so it cannot support operations on the elements, e.g., iterations.
This set is suitable for fast check on presence/absence of certain elements.
If you need a fully-functional set backing by bit set,
please use IndexerBitSet
.
This set extend AbstractSetEx
so that it can be used
(as large set) to construct hybrid set.
- See Also:
-
Constructor Summary
-
Method Summary
Methods inherited from class pascal.taie.util.collection.AbstractSetEx
addAllDiff, copy, hasOverlapWith, newSet
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
addAll, clear, containsAll, isEmpty, retainAll, toArray, toArray, 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
-
Constructor Details
-
IndexableSet
public IndexableSet(boolean isSparse)
-
-
Method Details
-
contains
-
add
-
remove
-
iterator
-
size
public int size()
-