question: protected void expandFor ( int i1 , int i2 , int d ) { if ( i1 >= sizes . size ( ) ) { int oldSize = sizes . size ( ) , capacity = vector . length ; sizes . set ( i1 , 0 ) ; if ( capacity < sizes . size ( ) ) { while ( capacity < sizes . size ( ) ) capacity *= 2 ; int [ ] [ ] t = new int [ capacity ] [ ] ; System . arraycopy ( vector , 0 , t , 0 , oldSize ) ; vector = t ; } for ( int i = oldSize ; i < sizes . size ( ) ; ++ i ) vector [ i ] = new int [ defaultCapacity2 ] ; } if ( i2 < sizes . get ( i1 ) ) return ; int oldSize = sizes . get ( i1 ) , capacity = vector [ i1 ] . length ; sizes . set ( i1 , i2 + 1 ) ; if ( capacity >= sizes . get ( i1 ) ) return ; while ( capacity < sizes . get ( i1 ) ) capacity *= 2 ; int [ ] t = new int [ capacity ] ; System . arraycopy ( vector [ i1 ] , 0 , t , 0 , oldSize ) ; if ( d != 0 ) Arrays . fill ( t , oldSize , sizes . get ( i1 ) , d ) ; vector [ i1 ] = t ; }
target:  Makes sure the capacities and sizes of the vectors can accomodate the given indexes. The capacities of the vectors are simply doubled until they can accomodate their sizes.