public static < T > T [ ] offerArray ( T [ ] prepend , T [ ] tail ) { if ( prepend == null || prepend . length < 1 ) { return tail ; } else if ( tail == null || tail . length < 1 ) { return prepend ; } else { T [ ] result = newArrayInstance ( tail , prepend . length + tail . length ) ; System . arraycopy ( prepend , 0 , result , 0 , prepend . length ) ; System . arraycopy ( tail , 0 , result , prepend . length , tail . length ) ; return result ; } }
Creates a copy of an array with another array prepended to it .