public T growW ( ) { T a ; if ( size >= data . length ) { a = data [ start ] ; if ( a == null ) data [ start ] = a = createInstance ( ) ; start = ( start + 1 ) % data . length ; } else { a = data [ ( start + size ) % data . length ] ; if ( a == null ) data [ ( start + size ) % data . length ] = a = createInstance ( ) ; size ++ ; } return a ; }
Adds a new element to the end of the list and returns it . If the inner array isn t large enough then the oldest element will be written over .