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

Method concat

output/java_guava/1.4.19/ObjectArrays.java:74–80  ·  view source on GitHub ↗

Returns a new array that contains the concatenated contents of two arrays. @param first the first array of elements to concatenate @param second the second array of elements to concatenate @param type the component type of the returned array

(T[] first, T[] second, Class<T> type)

Source from the content-addressed store, hash-verified

72 */
73
74 @GwtIncompatible // Array.newInstance(Class, int)
75 public static <T> T[] concat(T[] first, T[] second, Class<T> type) {
76 T[] result = newArray(type, first.length + second.length);
77 System.arraycopy(first, 0, result, 0, first.length);
78 System.arraycopy(second, 0, result, first.length, second.length);
79 return result;
80 }
81
82 /**
83 * Returns a new array that prepends {@code element} to {@code array}.

Callers 1

throwCauseMethod · 0.95

Calls 2

newArrayMethod · 0.95
arraysCopyOfMethod · 0.95

Tested by

no test coverage detected