it.unimi.dsi.bits
Class AbstractBitVector.LongSetView

java.lang.Object
  extended by java.util.AbstractCollection<Long>
      extended by it.unimi.dsi.fastutil.longs.AbstractLongCollection
          extended by it.unimi.dsi.fastutil.longs.AbstractLongSet
              extended by it.unimi.dsi.fastutil.longs.AbstractLongSortedSet
                  extended by it.unimi.dsi.bits.AbstractBitVector.LongSetView
All Implemented Interfaces:
LongCollection, LongIterable, LongSet, LongSortedSet, Serializable, Cloneable, Iterable<Long>, Collection<Long>, Set<Long>, SortedSet<Long>
Enclosing class:
AbstractBitVector

public static class AbstractBitVector.LongSetView
extends AbstractLongSortedSet
implements LongSet, Serializable

An integer sorted set view of a bit vector.

This class implements in the obvious way an integer set view of a bit vector. The vector is enlarged as needed (i.e., when a one beyond the current size is set), but it is never shrunk.

See Also:
Serialized Form

Field Summary
protected  BitVector bitVector
           
 
Constructor Summary
AbstractBitVector.LongSetView(BitVector bitVector, long from, long to)
           
 
Method Summary
 boolean add(long index)
           
 void clear()
           
 LongComparator comparator()
           
 boolean contains(long index)
           
 long firstLong()
           
 LongSortedSet headSet(long to)
           
 LongBidirectionalIterator iterator()
           
 LongBidirectionalIterator iterator(long from)
           
 long lastLong()
           
 boolean remove(long index)
           
 int size()
           
 LongSortedSet subSet(long from, long to)
           
 LongSortedSet tailSet(long from)
           
 
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongSortedSet
first, headSet, last, longIterator, subSet, tailSet
 
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongSet
equals, hashCode, rem, remove
 
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection
add, addAll, addAll, contains, containsAll, containsAll, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toLongArray, toLongArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
addAll, containsAll, longIterator, rem, removeAll, retainAll, toArray, toArray, toLongArray, toLongArray
 
Methods inherited from interface java.util.Set
add, addAll, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

bitVector

protected final BitVector bitVector
Constructor Detail

AbstractBitVector.LongSetView

public AbstractBitVector.LongSetView(BitVector bitVector,
                                     long from,
                                     long to)
Method Detail

contains

public boolean contains(long index)
Specified by:
contains in interface LongCollection
Overrides:
contains in class AbstractLongCollection

add

public boolean add(long index)
Specified by:
add in interface LongCollection
Overrides:
add in class AbstractLongCollection

remove

public boolean remove(long index)
Specified by:
remove in interface LongSet
Overrides:
remove in class AbstractLongSet

clear

public void clear()
Specified by:
clear in interface Collection<Long>
Specified by:
clear in interface Set<Long>
Overrides:
clear in class AbstractCollection<Long>

size

public int size()
Specified by:
size in interface Collection<Long>
Specified by:
size in interface Set<Long>
Specified by:
size in class AbstractCollection<Long>

iterator

public LongBidirectionalIterator iterator()
Specified by:
iterator in interface LongCollection
Specified by:
iterator in interface LongIterable
Specified by:
iterator in interface LongSet
Specified by:
iterator in interface LongSortedSet
Specified by:
iterator in interface Iterable<Long>
Specified by:
iterator in interface Collection<Long>
Specified by:
iterator in interface Set<Long>
Overrides:
iterator in class AbstractLongSortedSet

iterator

public LongBidirectionalIterator iterator(long from)
Specified by:
iterator in interface LongSortedSet

firstLong

public long firstLong()
Specified by:
firstLong in interface LongSortedSet

lastLong

public long lastLong()
Specified by:
lastLong in interface LongSortedSet

comparator

public LongComparator comparator()
Specified by:
comparator in interface LongSortedSet
Specified by:
comparator in interface SortedSet<Long>

headSet

public LongSortedSet headSet(long to)
Specified by:
headSet in interface LongSortedSet

tailSet

public LongSortedSet tailSet(long from)
Specified by:
tailSet in interface LongSortedSet

subSet

public LongSortedSet subSet(long from,
                            long to)
Specified by:
subSet in interface LongSortedSet