question: @ SuppressWarnings ( "unchecked" ) public static < T > Sequence < T > wrapStartEnd ( Sequence < T > sequence , T startToken , T endToken ) { Object [ ] arr = new Object [ sequence . size ( ) + 2 ] ; arr [ 0 ] = startToken ; System . arraycopy ( sequence . elements ( ) , 0 , arr , 1 , sequence . size ( ) ) ; arr [ sequence . size ( ) + 1 ] = endToken ; return new ArraySequence < T > ( true , ( T [ ] ) arr ) ; }
target:  Append a start symbol to the beginning of a sequence and an end symbol to the end of a sequence.