public interface TupleIterable extends Iterable<List<Member>>
Iterable
that returns a TupleIterator
.
If efficiency is important, call tupleCursor()
rather than
tupleIterator()
if possible. Because TupleCursor
is a
simpler API to implement than TupleIterator
, in some cases the
implementation may be more efficient.
Modifier and Type | Method and Description |
---|---|
int |
getArity()
Returns the number of members in each tuple.
|
Iterable<Member> |
slice(int column)
Returns an iterable over the members at a given column.
|
TupleCursor |
tupleCursor()
Creates a cursor over the contents of this iterable.
|
TupleIterator |
tupleIterator()
Creates an iterator over the contents of this iterable.
|
forEach, iterator, spliterator
TupleIterator tupleIterator()
Always has the same effect as calling Iterable.iterator()
.
tupleCursor()
TupleCursor tupleCursor()
The contents of the cursor will always be the same as those returned
by tupleIterator()
. Because TupleCursor
is a simpler API
to implement than TupleIterator
, in some cases the implementation
may be more efficient.
int getArity()
Iterable<Member> slice(int column)
The iteratble returns an interator that is modifiable if and only if this TupleIterable is modifiable.
If this TupleIterable
happens to be a TupleList
,
the method is overridden to return a List
<Member
>.
column
- Ordinal of the member in each tuple to projectIllegalArgumentException
- if column is not less than arityCopyright © 2020 Hitachi Vantara. All rights reserved.