Package mondrian.calc.impl
Class AbstractTupleList
- All Implemented Interfaces:
Cloneable,Iterable<List<Member>>,Collection<List<Member>>,List<List<Member>>,RandomAccess,TupleIterable,TupleList
- Direct Known Subclasses:
ArrayTupleList,DelegatingTupleList,ListTupleList
public abstract class AbstractTupleList
extends AbstractList<List<Member>>
implements RandomAccess, Cloneable, TupleList
Abstract implementation of
TupleList.- Author:
- jhyde
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classImplementation ofTupleIteratorforArrayTupleList.Nested classes/interfaces inherited from interface mondrian.calc.TupleList
TupleList.PositionCallback -
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCurrent(TupleCursor tupleIter) fix()Fixes the tuples of this list, so that their contents will not change even if elements of the list are reordered or removed.get(int slice, int index) Returns a particular column of a particular row.intgetArity()Returns the number of members in each tuple.iterator()abstract TupleListsubList(int fromIndex, int toIndex) Creates aTupleCursorover this list.final TupleIteratorCreates an iterator over the contents of this iterable.protected abstract TupleIteratorMethods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, get, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, setMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, toArray, toArray
-
Field Details
-
arity
protected final int arity -
mutable
protected boolean mutable
-
-
Constructor Details
-
AbstractTupleList
public AbstractTupleList(int arity)
-
-
Method Details
-
getArity
public int getArity()Description copied from interface:TupleIterableReturns the number of members in each tuple.- Specified by:
getArityin interfaceTupleIterable- Returns:
- The number of members in each tuple
-
tupleIteratorInternal
-
subList
-
fix
Description copied from interface:TupleListFixes the tuples of this list, so that their contents will not change even if elements of the list are reordered or removed. Returns this list if possible. -
iterator
-
tupleIterator
Description copied from interface:TupleIterableCreates an iterator over the contents of this iterable.Always has the same effect as calling
Iterable.iterator().- Specified by:
tupleIteratorin interfaceTupleIterable- Returns:
- cursor over the tuples returned by this iterable
- See Also:
-
tupleCursor
Creates aTupleCursorover this list.Any implementation of
TupleListmust implement all three methodsiterator(),tupleIterator()andtupleCursor. The default implementation returns the same for all three, but a derived classes can override this method to create a more efficient implementation that implements cursor but not iterator.- Specified by:
tupleCursorin interfaceTupleIterable- Returns:
- A cursor over this list
-
addCurrent
- Specified by:
addCurrentin interfaceTupleList
-
get
Description copied from interface:TupleListReturns a particular column of a particular row.Note that
list.get(row, column)is equivalent tolist.slice(column).get(row)andlist.get(row).get(column)but is more efficient for most implementations of TupleList.
-