it.unimi.dsi.util
Interface LongBigList

All Superinterfaces:
Collection<Long>, Comparable<List<? extends Long>>, Iterable<Long>, List<Long>, LongCollection, LongIterable, LongList
All Known Implementing Classes:
AbstractBitVector.LongBigListView, AbstractLongBigList, AbstractLongBigList.LongSubBigList, LongArrayBitVector.LongBigListView

public interface LongBigList
extends LongList

A list of longs with long indices.

Unfortunately, List is limited to positions smaller than or equal to Integer.MAX_VALUE. Since bits in a not-so-large array need to be indexed with longs, the list view over a bit vector requires a more powerful interface. The naming follows the fastutil conventions (actually, this class extends LongList).


Method Summary
 void add(long index, long value)
          Adds the long at the given position.
 long getLong(long index)
          Returns the long at the given position.
 long length()
          The number of elements in this big list.
 LongBigList length(long newLength)
          Sets the number of elements in this big list.
 long removeLong(long index)
          Removes the long at the given position.
 long set(long index, long value)
          Sets the long at the given position.
 LongBigList subList(long from, long to)
          Returns a big sublist view of this big list.
 
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongList
add, addAll, addAll, addAll, addElements, addElements, getElements, getLong, indexOf, iterator, lastIndexOf, listIterator, listIterator, longListIterator, longListIterator, longSubList, removeElements, removeLong, set, size, subList
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, lastIndexOf, remove, remove, removeAll, retainAll, set, size, toArray, toArray
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
add, addAll, contains, containsAll, longIterator, rem, removeAll, retainAll, toArray, toArray, toLongArray, toLongArray
 

Method Detail

getLong

long getLong(long index)
Returns the long at the given position.

Parameters:
index - a position in the list.
Returns:
the corresponding long value.
See Also:
List.get(int)

removeLong

long removeLong(long index)
Removes the long at the given position.

Parameters:
index - a position in the list.
Returns:
the long previously at the specified position.
See Also:
List.remove(int)

set

long set(long index,
         long value)
Sets the long at the given position.

Parameters:
index - a position in the list.
value - a long value.
Returns:
the previous value.
See Also:
List.set(int,Object)

add

void add(long index,
         long value)
Adds the long at the given position.

Parameters:
index - a position in the list.
value - a long value.
See Also:
List.add(int,Object)

length

long length()
The number of elements in this big list.

Returns:
the number of elements in this big list.
See Also:
List.size()

length

LongBigList length(long newLength)
Sets the number of elements in this big list.

Returns:
this big list.
See Also:
LongList.size(int)

subList

LongBigList subList(long from,
                    long to)
Returns a big sublist view of this big list.

Parameters:
from - the starting element (inclusive).
to - the ending element (exclusive).
Returns:
a big sublist view of this big list.
See Also:
List.subList(int, int)