MCPcopy Create free account
hub / github.com/antlr/codebuff / create

Method create

output/java_guava/1.4.16/CartesianList.java:39–49  ·  view source on GitHub ↗
(List<? extends List<? extends E>> lists)

Source from the content-addressed store, hash-verified

37 private final transient int[] axesSizeProduct;
38
39 static <E> List<List<E>> create(List<? extends List<? extends E>> lists) {
40 ImmutableList.Builder<List<E>> axesBuilder = new ImmutableList.Builder<List<E>>(lists.size());
41 for (List<? extends E> list : lists) {
42 List<E> copy = ImmutableList.copyOf(list);
43 if (copy.isEmpty()) {
44 return ImmutableList.of();
45 }
46 axesBuilder.add(copy);
47 }
48 return new CartesianList<E>(axesBuilder.build());
49 }
50
51 CartesianList(ImmutableList<List<E>> axes) {
52 this.axes = axes;

Callers 1

cartesianProductMethod · 0.95

Calls 6

copyOfMethod · 0.95
ofMethod · 0.95
addMethod · 0.95
buildMethod · 0.95
sizeMethod · 0.65
isEmptyMethod · 0.65

Tested by

no test coverage detected