mondrian.calc.impl
Class DelegatingTupleList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<List<Member>>
mondrian.calc.impl.AbstractTupleList
mondrian.calc.impl.DelegatingTupleList
- All Implemented Interfaces:
- Cloneable, Iterable<List<Member>>, Collection<List<Member>>, List<List<Member>>, RandomAccess, TupleIterable, TupleList
public class DelegatingTupleList
- extends AbstractTupleList
Implementation of TupleList based on a list of
List<Member> tuples.
- Author:
- jhyde
| Methods inherited from class java.util.AbstractList |
add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange |
| Methods inherited from interface java.util.List |
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, toArray, toArray |
DelegatingTupleList
public DelegatingTupleList(int arity,
List<List<Member>> list)
- Creates a DelegatingTupleList.
- Parameters:
arity - Aritylist - Backing list
tupleIteratorInternal
protected TupleIterator tupleIteratorInternal()
- Specified by:
tupleIteratorInternal in class AbstractTupleList
subList
public TupleList subList(int fromIndex,
int toIndex)
- Specified by:
subList in interface List<List<Member>>- Specified by:
subList in interface TupleList- Specified by:
subList in class AbstractTupleList
get
public List<Member> get(int index)
- Specified by:
get in interface List<List<Member>>- Specified by:
get in class AbstractList<List<Member>>
size
public int size()
- Specified by:
size in interface Collection<List<Member>>- Specified by:
size in interface List<List<Member>>- Specified by:
size in class AbstractCollection<List<Member>>
slice
public 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
set
public List<Member> set(int index,
List<Member> element)
- Specified by:
set in interface List<List<Member>>- Overrides:
set in class AbstractList<List<Member>>
add
public void add(int index,
List<Member> element)
- Specified by:
add in interface List<List<Member>>- Overrides:
add in class AbstractList<List<Member>>
addTuple
public void addTuple(Member... members)
project
public TupleList project(int[] destIndices)
withPositionCallback
public TupleList withPositionCallback(TupleList.PositionCallback positionCallback)