public class UnaryTupleList extends AbstractList<List<Member>> implements TupleList
TupleList where the tuples are unary (each tuple
consists of just one Member).
It is implemented as a straightforward wrapper on a backing list. You
can provide the backing list explicitly using the
UnaryTupleList(java.util.List) constructor, and you can access the
backing list by calling slice(int)(0).
TupleList.PositionCallbackmodCount| Constructor and Description |
|---|
UnaryTupleList()
Creates an empty UnaryTupleList.
|
UnaryTupleList(List<Member> list)
Creates a UnaryTupleList with a given backing list.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
List<Member> element) |
boolean |
add(List<Member> element) |
void |
addCurrent(TupleCursor tupleIter) |
void |
addTuple(Member... members) |
void |
clear() |
TupleList |
cloneList(int capacity)
Creates a copy of this list that has the same type and has a given
capacity.
|
TupleList |
fix()
Fixes the tuples of this list, so that their contents will not change
even if elements of the list are reordered or removed.
|
List<Member> |
get(int index) |
Member |
get(int slice,
int index)
Returns a particular column of a particular row.
|
int |
getArity()
Returns the number of members in each tuple.
|
Iterator<List<Member>> |
iterator() |
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) |
TupleCursor |
tupleCursor()
Creates a cursor over the contents of this iterable.
|
TupleIterator |
tupleIterator()
Creates an iterator over the contents of this iterable.
|
TupleList |
withPositionCallback(TupleList.PositionCallback positionCallback) |
addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, removeRangeaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, addAll, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, streampublic 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.
public TupleList fix()
TupleListpublic void clear()
public int size()
public int getArity()
TupleIterablegetArity in interface TupleIterablepublic 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.
slice in interface TupleIterableslice in interface TupleListcolumn - 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.
public TupleCursor tupleCursor()
TupleIterableThe contents of the cursor will always be the same as those returned
by TupleIterable.tupleIterator(). Because TupleCursor is a simpler API
to implement than TupleIterator, in some cases the implementation
may be more efficient.
tupleCursor in interface TupleIterablepublic TupleIterator tupleIterator()
TupleIterableAlways has the same effect as calling Iterable.iterator().
tupleIterator in interface TupleIterableTupleIterable.tupleCursor()public void addCurrent(TupleCursor tupleIter)
addCurrent in interface TupleListpublic TupleList subList(int fromIndex, int toIndex)
public TupleList withPositionCallback(TupleList.PositionCallback positionCallback)
withPositionCallback in interface TupleListCopyright © 2018 Hitachi Vantara. All rights reserved.