Package mondrian.calc
Interface TupleIterable
- All Known Subinterfaces:
TupleList
- All Known Implementing Classes:
AbstractTupleIterable
,AbstractTupleList
,ArrayTupleList
,DelegatingTupleList
,ListTupleList
,UnaryTupleList
Extension to
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.
- Author:
- jhyde
-
Method Summary
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
tupleIterator
TupleIterator tupleIterator()Creates an iterator over the contents of this iterable.Always has the same effect as calling
Iterable.iterator()
.- Returns:
- cursor over the tuples returned by this iterable
- See Also:
-
tupleCursor
TupleCursor tupleCursor()Creates a cursor over the contents of this iterable.The contents of the cursor will always be the same as those returned by
tupleIterator()
. BecauseTupleCursor
is a simpler API to implement thanTupleIterator
, in some cases the implementation may be more efficient.- Returns:
- cursor over the tuples returned by this iterable
-
getArity
int getArity()Returns the number of members in each tuple.- Returns:
- The number of members in each tuple
-
slice
Returns an iterable over the members at a given column.The iteratble returns an interator that is modifiable if and only if this TupleIterable is modifiable.
If this
TupleIterable
happens to be aTupleList
, the method is overridden to return aList
<Member
>.- Parameters:
column
- Ordinal of the member in each tuple to project- Returns:
- Iterable that returns an iterator over members
- Throws:
IllegalArgumentException
- if column is not less than arity
-