Package mondrian.calc.impl
Class AbstractEndToEndTupleList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<List<Member>>
-
- mondrian.calc.impl.AbstractTupleList
-
- mondrian.calc.impl.AbstractEndToEndTupleList
-
- All Implemented Interfaces:
Cloneable
,Iterable<List<Member>>
,Collection<List<Member>>
,List<List<Member>>
,RandomAccess
,TupleIterable
,TupleList
- Direct Known Subclasses:
ArrayTupleList
,ListTupleList
abstract class AbstractEndToEndTupleList extends AbstractTupleList
Abstract implementation of aTupleList
that stores tuples in end-to-end format.For example, if the arity is 3, the tuples {(A1, B1, C1), (A1, B2, C2)} will be stored as {A1, B1, C1, A2, B2, C2}. This is memory-efficient (only one array, compared to 3 arrays or one array per tuple in other representations), has good locality of reference, and typical operations require few indirections.
Concrete subclasses can store the data in various backing lists.
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class mondrian.calc.impl.AbstractTupleList
AbstractTupleList.AbstractTupleListIterator
-
Nested classes/interfaces inherited from interface mondrian.calc.TupleList
TupleList.PositionCallback
-
-
Field Summary
-
Fields inherited from class mondrian.calc.impl.AbstractTupleList
arity, mutable
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description AbstractEndToEndTupleList(int arity)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
addAll(int i, Collection<? extends List<Member>> c)
boolean
addAll(Collection<? extends List<Member>> c)
protected abstract List<Member>
backingList()
TupleList
project(int[] destIndices)
List<Member>
set(int index, List<Member> element)
TupleList
subList(int fromIndex, int toIndex)
TupleList
withPositionCallback(TupleList.PositionCallback positionCallback)
-
Methods inherited from class mondrian.calc.impl.AbstractTupleList
addCurrent, fix, get, getArity, iterator, tupleCursor, tupleIterator, tupleIteratorInternal
-
Methods inherited from class java.util.AbstractList
add, add, clear, equals, get, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange
-
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, add, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
project
public TupleList project(int[] destIndices)
-
addAll
public boolean addAll(Collection<? extends List<Member>> c)
-
addAll
public boolean addAll(int i, Collection<? extends List<Member>> c)
-
subList
public TupleList subList(int fromIndex, int toIndex)
-
withPositionCallback
public TupleList withPositionCallback(TupleList.PositionCallback positionCallback)
-
-