mondrian.util
Class CartesianProductList<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<List<T>>
          extended by mondrian.util.CartesianProductList<T>
All Implemented Interfaces:
Iterable<List<T>>, Collection<List<T>>, List<List<T>>, RandomAccess

public class CartesianProductList<T>
extends AbstractList<List<T>>
implements RandomAccess

List that generates the cartesian product of its component lists.

Author:
jhyde

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CartesianProductList(List<List<T>> lists)
           
 
Method Summary
 List<T> get(int index)
           
 void getIntoArray(int index, Object[] a)
           
 Iterator<List<T>> iterator()
           
 int size()
           
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

CartesianProductList

public CartesianProductList(List<List<T>> lists)
Method Detail

get

public List<T> get(int index)
Specified by:
get in interface List<List<T>>
Specified by:
get in class AbstractList<List<T>>

size

public int size()
Specified by:
size in interface Collection<List<T>>
Specified by:
size in interface List<List<T>>
Specified by:
size in class AbstractCollection<List<T>>

getIntoArray

public void getIntoArray(int index,
                         Object[] a)

iterator

public Iterator<List<T>> iterator()
Specified by:
iterator in interface Iterable<List<T>>
Specified by:
iterator in interface Collection<List<T>>
Specified by:
iterator in interface List<List<T>>
Overrides:
iterator in class AbstractList<List<T>>

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads