MCPcopy Index your code
hub / github.com/bazelbuild/bazel / wrap

Method wrap

src/main/java/net/starlark/java/eval/Tuple.java:58–67  ·  view source on GitHub ↗

Returns a Tuple that wraps the specified array, which must not be subsequently modified.

(Object[] array)

Source from the content-addressed store, hash-verified

56
57 /** Returns a Tuple that wraps the specified array, which must not be subsequently modified. */
58 static Tuple wrap(Object[] array) {
59 switch (array.length) {
60 case 0:
61 return RegularTuple.EMPTY;
62 case 1:
63 return new SingletonTuple(array[0]);
64 default:
65 return new RegularTuple(array);
66 }
67 }
68
69 /** Returns a tuple containing the given elements. */
70 public static Tuple copyOf(Iterable<?> seq) {

Callers 13

copyOfMethod · 0.95
ofMethod · 0.95
pairMethod · 0.95
tripleMethod · 0.95
concatMethod · 0.95
tupleMethod · 0.95
zipMethod · 0.95
newFunctionMethod · 0.95
evalListMethod · 0.95
callMethod · 0.95
callMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected