Package pascal.taie.util.collection
Class IndexerBitSet<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
pascal.taie.util.collection.AbstractSetEx<E>
pascal.taie.util.collection.GenericBitSet<E>
pascal.taie.util.collection.IndexerBitSet<E>
- Type Parameters:
E- type of elements
- All Implemented Interfaces:
Serializable,Iterable<E>,Collection<E>,Set<E>,SetEx<E>,Copyable<SetEx<E>>
This implementation leverages
Indexer to take care of the mappings
between objects and indexes. The indexer itself acts as the context object.- See Also:
-
Field Summary
Fields inherited from class pascal.taie.util.collection.GenericBitSet
bitSet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectprotected EgetElement(int index) Maps an index to the corresponding object.protected intMaps an object to the corresponding index.protected GenericBitSet<E>newSet()Creates and returns a new set.Methods inherited from class pascal.taie.util.collection.GenericBitSet
add, addAll, addAllDiff, clear, contains, containsAll, copy, hashCode, hasOverlapWith, isEmpty, iterator, remove, removeAll, retainAll, setTo, sizeMethods inherited from class java.util.AbstractSet
equalsMethods inherited from class java.util.AbstractCollection
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
equals, spliterator, toArray, toArray
-
Constructor Details
-
IndexerBitSet
-
-
Method Details
-
getContext
- Specified by:
getContextin classGenericBitSet<E>- Returns:
- the context for the objects represented by the bits in this set.
-
getIndex
Description copied from class:GenericBitSetMaps an object to the corresponding index.- Specified by:
getIndexin classGenericBitSet<E>
-
getElement
Description copied from class:GenericBitSetMaps an index to the corresponding object.- Specified by:
getElementin classGenericBitSet<E>
-
newSet
Description copied from class:AbstractSetExCreates and returns a new set. The type of the new set should be the corresponding subclass. This method is provided to ease the implementation ofAbstractSetEx.copy()andAbstractSetEx.addAllDiff(Collection). If a subclass overwrites above two methods, it does not need to re-implement this method.- Specified by:
newSetin classGenericBitSet<E>
-