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

Method toArray

output/java_guava/1.4.17/Iterables.java:336–339  ·  view source on GitHub ↗

Copies an iterable's elements into an array. @param iterable the iterable to copy @param type the type of the elements @return a newly-allocated array into which all the elements of the iterable have been copied

(Iterable<? extends T> iterable, Class<T> type)

Source from the content-addressed store, hash-verified

334 */
335
336 @GwtIncompatible // Array.newInstance(Class, int)
337 public static <T> T[] toArray(Iterable<? extends T> iterable, Class<T> type) {
338 return toArray(iterable, ObjectArrays.newArray(type, 0));
339 }
340
341 static <T> T[] toArray(Iterable<? extends T> iterable, T[] array) {
342 Collection<? extends T> collection = castOrCopyToCollection(iterable);

Callers 9

toArrayMethod · 0.95
sortedCopyMethod · 0.95
immutableSortedCopyMethod · 0.95
copyOfMethod · 0.95
toArrayMethod · 0.95
copyOfMethod · 0.95
fromEntriesMethod · 0.95
bulkGetMethod · 0.95
copyOfMethod · 0.95

Calls 2

newArrayMethod · 0.95

Tested by

no test coverage detected