Package mondrian.calc.impl
Class DelegatingTupleList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<java.util.List<Member>>
-
- mondrian.calc.impl.AbstractTupleList
-
- mondrian.calc.impl.DelegatingTupleList
-
- 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
public class DelegatingTupleList extends AbstractTupleList
Implementation ofTupleList
based on a list ofList<Member>
tuples.- 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 DelegatingTupleList(int arity, java.util.List<java.util.List<Member>> list)
Creates a DelegatingTupleList.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, java.util.List<Member> element)
void
addTuple(Member... members)
TupleList
cloneList(int capacity)
Creates a copy of this list that has the same type and has a given capacity.java.util.List<Member>
get(int index)
TupleList
project(int[] destIndices)
java.util.List<Member>
set(int index, java.util.List<Member> element)
int
size()
java.util.List<Member>
slice(int column)
Returns a list of the members at a given column.TupleList
subList(int fromIndex, int toIndex)
protected TupleIterator
tupleIteratorInternal()
TupleList
withPositionCallback(TupleList.PositionCallback positionCallback)
-
Methods inherited from class mondrian.calc.impl.AbstractTupleList
addCurrent, fix, get, getArity, iterator, tupleCursor, tupleIterator
-
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
DelegatingTupleList
public DelegatingTupleList(int arity, java.util.List<java.util.List<Member>> list)
Creates a DelegatingTupleList.- Parameters:
arity
- Aritylist
- Backing list
-
-
Method Detail
-
tupleIteratorInternal
protected TupleIterator tupleIteratorInternal()
- Specified by:
tupleIteratorInternal
in classAbstractTupleList
-
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
-
get
public java.util.List<Member> get(int index)
-
size
public int size()
-
slice
public java.util.List<Member> slice(int column)
Description copied from interface:TupleList
Returns a list of the members at a given column.The list is modifiable if and only if this TupleList is modifiable. Adding an element to a slice will create a tuple whose members in other columns are null. Removing an element from a slicer will remove a tuple.
- Parameters:
column
- Ordinal of the member in each tuple to project- Returns:
- List of members
-
cloneList
public TupleList cloneList(int capacity)
Description copied from interface:TupleList
Creates a copy of this list that has the same type and has a given capacity.If capacity is negative, populates the list. A deep copy is made, so that it the contents of the list are not affected to changes to any backing collections.
- Parameters:
capacity
- Capacity- Returns:
- Copy of list, empty if capacity is non-negative
-
add
public void add(int index, java.util.List<Member> element)
-
addTuple
public void addTuple(Member... members)
-
project
public TupleList project(int[] destIndices)
-
withPositionCallback
public TupleList withPositionCallback(TupleList.PositionCallback positionCallback)
-
-