Returns every possible list that can be formed by choosing one element from each of the given sets in order; the "n-ary <a href="http://en.wikipedia.org/wiki/Cartesian_product">Cartesian product</a>" of the sets. For example: {@snippet : Sets.cartesianProduct(ImmutableList.of(ImmutableSet.of(1, 2),
(List<? extends Set<? extends B>> sets)
| 1470 | * @since 2.0 |
| 1471 | */ |
| 1472 | public static <B> Set<List<B>> cartesianProduct(List<? extends Set<? extends B>> sets) { |
| 1473 | return CartesianSet.create(sets); |
| 1474 | } |
| 1475 | |
| 1476 | /** |
| 1477 | * Returns every possible list that can be formed by choosing one element from each of the given |