it.unimi.dsi.bits
Class AbstractBitVector.LongBigListView

java.lang.Object
  extended by java.util.AbstractCollection<Long>
      extended by it.unimi.dsi.fastutil.longs.AbstractLongCollection
          extended by it.unimi.dsi.fastutil.longs.AbstractLongBigList
              extended by it.unimi.dsi.bits.AbstractBitVector.LongBigListView
All Implemented Interfaces:
BigList<Long>, LongBigList, LongCollection, LongIterable, LongStack, Size64, Stack<Long>, Serializable, Comparable<BigList<? extends Long>>, Iterable<Long>, Collection<Long>
Direct Known Subclasses:
LongArrayBitVector.LongBigListView
Enclosing class:
AbstractBitVector

public static class AbstractBitVector.LongBigListView
extends AbstractLongBigList
implements LongBigList, Serializable

A list-of-integers view of a bit vector.

This class implements in the obvious way a view of a bit vector as a list of integers of given width. The vector is enlarged as needed (i.e., when adding new elements), but it is never shrunk.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.longs.AbstractLongBigList
AbstractLongBigList.LongSubList
 
Field Summary
protected  BitVector bitVector
          The underlying bit vector.
protected  long fullMask
          A bit mask containing width bits set to one.
protected  int width
          The width in bit of an element of this list view.
 
Constructor Summary
AbstractBitVector.LongBigListView(BitVector bitVector, int width)
           
 
Method Summary
 void add(int index, long value)
           
 void add(long index, long value)
           
 long getLong(int index)
           
 long getLong(long index)
           
 long length()
           
 LongBigList length(long newSize)
           
 LongBigListIterator listIterator()
           
 long removeLong(long index)
           
 long set(int index, long value)
           
 long set(long index, long value)
           
 int size()
           
 void size(long newSize)
           
 long size64()
           
 LongBigList subList(long from, long to)
           
 
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongBigList
add, add, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addElements, addElements, compareTo, contains, ensureIndex, ensureRestrictedIndex, equals, get, getElements, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekLong, pop, popLong, push, push, rem, remove, remove, removeElements, removeLong, set, size, top, topLong, toString
 
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection
add, contains, containsAll, containsAll, isEmpty, longIterator, rem, remove, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toLongArray, toLongArray
 
Methods inherited from class java.util.AbstractCollection
clear
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongBigList
addAll, addAll, addAll, addElements, addElements, getElements, indexOf, iterator, lastIndexOf, listIterator, removeElements
 
Methods inherited from interface it.unimi.dsi.fastutil.BigList
add, addAll, get, indexOf, lastIndexOf, remove, set
 
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
add, addAll, contains, containsAll, longIterator, rem, removeAll, retainAll, toArray, toArray, toLongArray, toLongArray
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
 

Field Detail

bitVector

protected final BitVector bitVector
The underlying bit vector.


width

protected final int width
The width in bit of an element of this list view.


fullMask

protected final long fullMask
A bit mask containing width bits set to one.

Constructor Detail

AbstractBitVector.LongBigListView

public AbstractBitVector.LongBigListView(BitVector bitVector,
                                         int width)
Method Detail

length

public long length()

size

public int size()
Specified by:
size in interface Size64
Specified by:
size in interface Collection<Long>
Overrides:
size in class AbstractLongBigList

size64

public long size64()
Specified by:
size64 in interface Size64

length

public LongBigList length(long newSize)

size

public void size(long newSize)
Specified by:
size in interface BigList<Long>
Overrides:
size in class AbstractLongBigList

listIterator

public LongBigListIterator listIterator()
Specified by:
listIterator in interface BigList<Long>
Specified by:
listIterator in interface LongBigList
Overrides:
listIterator in class AbstractLongBigList

add

public void add(int index,
                long value)

add

public void add(long index,
                long value)
Specified by:
add in interface LongBigList
Overrides:
add in class AbstractLongBigList

getLong

public long getLong(long index)
Specified by:
getLong in interface LongBigList

getLong

public long getLong(int index)
Overrides:
getLong in class AbstractLongBigList

removeLong

public long removeLong(long index)
Specified by:
removeLong in interface LongBigList
Overrides:
removeLong in class AbstractLongBigList

set

public long set(long index,
                long value)
Specified by:
set in interface LongBigList
Overrides:
set in class AbstractLongBigList

set

public long set(int index,
                long value)
Overrides:
set in class AbstractLongBigList

subList

public LongBigList subList(long from,
                           long to)
Specified by:
subList in interface BigList<Long>
Specified by:
subList in interface LongBigList
Overrides:
subList in class AbstractLongBigList