MCPcopy
hub / github.com/google/guava / cartesianProduct

Method cartesianProduct

guava/src/com/google/common/collect/Sets.java:1472–1474  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Calls 2

createMethod · 0.95
asListMethod · 0.45