Package it.unimi.dsi.bits
Class AbstractBitVector.LongSetView
java.lang.Object
java.util.AbstractCollection<Long>
it.unimi.dsi.fastutil.longs.AbstractLongCollection
it.unimi.dsi.fastutil.longs.AbstractLongSet
it.unimi.dsi.fastutil.longs.AbstractLongSortedSet
it.unimi.dsi.bits.AbstractBitVector.LongSetView
- All Implemented Interfaces:
LongBidirectionalIterable,LongCollection,LongIterable,LongSet,LongSortedSet,Size64,Serializable,Cloneable,Iterable<Long>,Collection<Long>,Set<Long>,SortedSet<Long>
- Enclosing class:
- AbstractBitVector
public static class AbstractBitVector.LongSetView
extends AbstractLongSortedSet
implements LongSet, Serializable, Size64
A view of a bit vector as a sorted set of long integers.
This class implements a view of a subvector as a sorted set of long integers using the subvector
as a bit mask. If the end position is Long.MAX_VALUE, the vector is enlarged as needed
(i.e., when a one beyond the current size is set), but it is never shrunk.
Outside of the specified range {contains(long) will return false and add(long)
will cause an UnsupportedOperationException.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLongSetView(BitVector bitVector, long from, long to) Creates a new view on a subvector. -
Method Summary
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongSet
equals, hashCode, remMethods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection
add, addAll, addAll, contains, containsAll, containsAll, forEach, remove, removeAll, removeAll, removeIf, retainAll, retainAll, toArray, toLongArray, toLongArray, toStringMethods inherited from class java.util.AbstractCollection
isEmpty, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
toArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
addAll, containsAll, longIterator, longParallelStream, longSpliterator, longStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toLongArray, toLongArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongIterable
forEach, forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.longs.LongSortedSet
first, headSet, last, spliterator, subSet, tailSet
-
Field Details
-
bitVector
The underlying bit vector.
-
-
Constructor Details
-
LongSetView
Creates a new view on a subvector.- Parameters:
bitVector- the underlying bit vector.from- the first index (inclusive).to- the last index (not inclusive).
-
-
Method Details
-
contains
public boolean contains(long index) - Specified by:
containsin interfaceLongCollection- Overrides:
containsin classAbstractLongCollection
-
add
public boolean add(long index) - Specified by:
addin interfaceLongCollection- Overrides:
addin classAbstractLongCollection
-
remove
public boolean remove(long index) - Specified by:
removein interfaceLongSet- Overrides:
removein classAbstractLongSet
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Long>- Specified by:
clearin interfaceSet<Long>- Overrides:
clearin classAbstractCollection<Long>
-
size64
public long size64() -
size
Deprecated. -
iterator
- Specified by:
iteratorin interfaceCollection<Long>- Specified by:
iteratorin interfaceIterable<Long>- Specified by:
iteratorin interfaceLongBidirectionalIterable- Specified by:
iteratorin interfaceLongCollection- Specified by:
iteratorin interfaceLongIterable- Specified by:
iteratorin interfaceLongSet- Specified by:
iteratorin interfaceLongSortedSet- Specified by:
iteratorin interfaceSet<Long>- Specified by:
iteratorin classAbstractLongSortedSet
-
iterator
- Specified by:
iteratorin interfaceLongSortedSet
-
firstLong
public long firstLong()- Specified by:
firstLongin interfaceLongSortedSet
-
lastLong
public long lastLong()- Specified by:
lastLongin interfaceLongSortedSet
-
comparator
- Specified by:
comparatorin interfaceLongSortedSet- Specified by:
comparatorin interfaceSortedSet<Long>
-
headSet
- Specified by:
headSetin interfaceLongSortedSet
-
tailSet
- Specified by:
tailSetin interfaceLongSortedSet
-
subSet
- Specified by:
subSetin interfaceLongSortedSet
-