public class ArrayTupleList extends AbstractTupleList
TupleList
that stores tuples end-to-end in an
array.AbstractTupleList.AbstractTupleListIterator
TupleList.PositionCallback
arity, mutable
modCount
Constructor and Description |
---|
ArrayTupleList(int arity)
Creates an empty ArrayTupleList with an initial capacity of 10 tuples.
|
ArrayTupleList(int arity,
int initialCapacity)
Creates an empty ArrayTupleList.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
List<Member> members) |
boolean |
add(List<Member> members) |
boolean |
addAll(Collection<? extends List<Member>> c) |
boolean |
addAll(int index,
Collection<? extends List<Member>> c) |
void |
addCurrent(TupleCursor tupleIter) |
void |
addTuple(Member... members) |
protected List<Member> |
backingList() |
TupleList |
cloneList(int capacity)
Creates a copy of this list that has the same type and has a given
capacity.
|
List<Member> |
get(int index) |
Member |
get(int slice,
int index)
Returns a particular column of a particular row.
|
TupleList |
project(int[] destIndices) |
List<Member> |
remove(int index) |
List<Member> |
set(int index,
List<Member> element) |
int |
size() |
List<Member> |
slice(int column)
Returns a list of the members at a given column.
|
TupleList |
subList(int fromIndex,
int toIndex) |
TupleIterator |
tupleIteratorInternal() |
TupleList |
withPositionCallback(TupleList.PositionCallback positionCallback) |
fix, getArity, iterator, tupleCursor, tupleIterator
clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, removeRange
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public ArrayTupleList(int arity)
arity
- Aritypublic ArrayTupleList(int arity, int initialCapacity)
arity
- ArityinitialCapacity
- Initial capacitypublic Member get(int slice, int index)
TupleList
Note that list.get(row, column)
is equivalent to list.slice(column).get(row)
and list.get(row).get(column)
but is more efficient for most implementations of TupleList.
get
in interface TupleList
get
in class AbstractTupleList
slice
- Column ordinalindex
- Row ordinalpublic void addCurrent(TupleCursor tupleIter)
addCurrent
in interface TupleList
addCurrent
in class AbstractTupleList
public int size()
public boolean addAll(int index, Collection<? extends List<Member>> c)
public void addTuple(Member... members)
public List<Member> slice(int column)
TupleList
The list is modifiable if and only if this TupleList is modifiable. Adding an element to a slice will create a tuple whose members in other columns are null. Removing an element from a slicer will remove a tuple.
column
- Ordinal of the member in each tuple to projectpublic TupleList cloneList(int capacity)
TupleList
If capacity is negative, populates the list. A deep copy is made, so that it the contents of the list are not affected to changes to any backing collections.
capacity
- Capacitypublic TupleIterator tupleIteratorInternal()
tupleIteratorInternal
in class AbstractTupleList
public TupleList project(int[] destIndices)
public boolean addAll(Collection<? extends List<Member>> c)
public TupleList subList(int fromIndex, int toIndex)
public TupleList withPositionCallback(TupleList.PositionCallback positionCallback)
Copyright © 2018 Hitachi Vantara. All rights reserved.