public class Combination<T>
extends java.lang.Object
implements java.lang.Iterable<java.util.List<T>>
| Constructor and Description |
|---|
Combination(T[]... sets)
Construct an
Iterable of all combinations of arrays, taking one element from each array. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<java.util.List<T>> |
iterator() |
public Combination(T[]... sets)
Iterable of all combinations of arrays, taking one element from each array.
For example, suppose we have two arrays:
{1, 2}
{3, 4, 5}
The possible combinations are:
{1, 3}
{1, 4}
{1, 5}
{2, 3}
{2, 4}
{2, 5}
sets - arrays of elements