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

Method toArray

corpus/java/training/guava/collect/Iterables.java:320–323  ·  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

318 * have been copied
319 */
320 @GwtIncompatible // Array.newInstance(Class, int)
321 public static <T> T[] toArray(Iterable<? extends T> iterable, Class<T> type) {
322 return toArray(iterable, ObjectArrays.newArray(type, 0));
323 }
324
325 static <T> T[] toArray(Iterable<? extends T> iterable, T[] array) {
326 Collection<? extends T> collection = castOrCopyToCollection(iterable);

Callers 15

toArrayMethod · 0.95
sortedCopyMethod · 0.95
immutableSortedCopyMethod · 0.95
copyOfMethod · 0.95
toArrayMethod · 0.95
copyOfMethod · 0.95
fromEntriesMethod · 0.95
copyOfMethod · 0.95
bulkGetMethod · 0.95
copyOfMethod · 0.45
writeReplaceMethod · 0.45
leastOfMethod · 0.45

Calls 2

newArrayMethod · 0.95

Tested by

no test coverage detected