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)
| 70 | * @param type the component type of the returned array |
| 71 | */ |
| 72 | @GwtIncompatible // Array.newInstance(Class, int) |
| 73 | public static <T> T[] concat(T[] first, T[] second, Class<T> type) { |
| 74 | T[] result = newArray(type, first.length + second.length); |
| 75 | System.arraycopy(first, 0, result, 0, first.length); |
| 76 | System.arraycopy(second, 0, result, first.length, second.length); |
| 77 | return result; |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Returns a new array that prepends {@code element} to {@code array}. |
no test coverage detected