@ GwtIncompatible // Array.newInstance(Class, int) public static < T > T [ ] concat ( T [ ] first , T [ ] second , Class < T > type ) { T [ ] result = newArray ( type , first . length + second . length ) ; System . arraycopy ( first , 0 , result , 0 , first . length ) ; System . arraycopy ( second , 0 , result , first . length , second . length ) ; return result ; }
Returns a new array that contains the concatenated contents of two arrays .