Package mondrian.calc.impl
Class AbstractEndToEndTupleList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<java.util.List<Member>>
-
- mondrian.calc.impl.AbstractTupleList
-
- mondrian.calc.impl.AbstractEndToEndTupleList
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Iterable<java.util.List<Member>>
,java.util.Collection<java.util.List<Member>>
,java.util.List<java.util.List<Member>>
,java.util.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
-
-
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, java.util.Collection<? extends java.util.List<Member>> c)
boolean
addAll(java.util.Collection<? extends java.util.List<Member>> c)
protected abstract java.util.List<Member>
backingList()
TupleList
project(int[] destIndices)
java.util.List<Member>
set(int index, java.util.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
-
-
-
-
Method Detail
-
project
public TupleList project(int[] destIndices)
-
backingList
protected abstract java.util.List<Member> backingList()
-
addAll
public boolean addAll(java.util.Collection<? extends java.util.List<Member>> c)
-
addAll
public boolean addAll(int i, java.util.Collection<? extends java.util.List<Member>> c)
-
subList
public TupleList subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfacejava.util.List<java.util.List<Member>>
- Specified by:
subList
in interfaceTupleList
- Specified by:
subList
in classAbstractTupleList
-
withPositionCallback
public TupleList withPositionCallback(TupleList.PositionCallback positionCallback)
-
-