Package mondrian.util
Class CombiningGenerator<E>
A list that, given a collection of elements, contains every possible
combination of those objects (also known as the
power set of those
objects).
- Author:
- LBoudreau, jhyde
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(int index) static voidAd hoc test.static <T> CombiningGenerator<T>of(Collection<T> elements) Creates a CombiningGenerator, inferring the type from the argument.intsize()Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
CombiningGenerator
Creates a CombiningGenerator.- Parameters:
elements- Elements to iterate over
-
-
Method Details
-
of
Creates a CombiningGenerator, inferring the type from the argument.- Type Parameters:
T- Element type- Parameters:
elements- Elements to iterate over- Returns:
- Combing generator containing the power set
-
get
-
size
public int size()- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein interfaceList<E>- Specified by:
sizein classAbstractCollection<List<E>>
-
main
Ad hoc test. See also UtilTest.testCombiningGenerator.- Parameters:
args- ignored
-