public class ArrayTupleList extends AbstractTupleList
TupleList that stores tuples end-to-end in an array.AbstractTupleList.AbstractTupleListIteratorTupleList.PositionCallbackarity, mutablemodCount| 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.
|
boolean |
equals(Object o) |
List<Member> |
get(int index) |
Member |
get(int slice,
int index)
Returns a particular column of a particular row.
|
int |
hashCode() |
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, tupleIteratorclear, indexOf, lastIndexOf, listIterator, listIterator, removeRangecontains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitclear, contains, containsAll, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, streampublic ArrayTupleList(int arity)
arity - Aritypublic ArrayTupleList(int arity,
int initialCapacity)
arity - ArityinitialCapacity - Initial capacitypublic Member get(int slice, int index)
TupleListNote 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 TupleListget in class AbstractTupleListslice - Column ordinalindex - Row ordinalpublic void addCurrent(TupleCursor tupleIter)
addCurrent in interface TupleListaddCurrent in class AbstractTupleListpublic int size()
public boolean addAll(int index,
Collection<? extends List<Member>> c)
public void addTuple(Member... members)
public List<Member> slice(int column)
TupleListThe 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)
TupleListIf 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 AbstractTupleListpublic boolean equals(Object o)
public int hashCode()
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 © 2021 Hitachi Vantara. All rights reserved.