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

Method copyOf

output/java_guava/1.4.17/ImmutableList.java:230–235  ·  view source on GitHub ↗

Returns an immutable list containing the given elements, in order. If elements is a Collection, this method behaves exactly as #copyOf(Collection); otherwise, it behaves exactly as copyOf(elements.iterator(). @throws NullPointerException if any of elements is

(Iterable<? extends E> elements)

Source from the content-addressed store, hash-verified

228
229
230 public static <E> ImmutableList<E> copyOf(Iterable<? extends E> elements) {
231 checkNotNull(elements); // TODO(kevinb): is this here only for GWT?
232 return (elements instanceof Collection)
233 ? copyOf((Collection<? extends E>) elements)
234 : copyOf(elements.iterator());
235 }
236
237 /**
238 * Returns an immutable list containing the given elements, in order.

Callers 15

copyOfMethod · 0.95
ParameterMethod · 0.95
concatMethod · 0.95
CompoundOrderingMethod · 0.95
allAsListMethod · 0.95
whenAllCompleteMethod · 0.95
whenAllSucceedMethod · 0.95
successfulAsListMethod · 0.95
immutableSortedCopyMethod · 0.95
computeNextMethod · 0.95
permutationsMethod · 0.95
computeNextMethod · 0.95

Calls 15

asImmutableListMethod · 0.95
constructMethod · 0.95
ofMethod · 0.95
iteratorMethod · 0.65
nextMethod · 0.65
addAllMethod · 0.65
addMethod · 0.65
checkNotNullMethod · 0.45
asListMethod · 0.45
isPartialViewMethod · 0.45
toArrayMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected