protected final void append ( ArrayList < String > list , int index , String value ) { // expand the list as necessary while ( list . size ( ) <= index ) { list . add ( "" ) ; } list . set ( index , list . get ( index ) + value ) ; }
Appends the supplied string to the contents of the list at the supplied index . If the list has no contents at the supplied index the supplied value becomes the contents at that index .