private void enlargeOffset ( ) { if ( offset == 0 ) { offCount = offCount == 0 ? 1 : offCount * 2 ; offset = offCount ; Object [ ] narr = new Object [ arr . length + offset ] ; for ( int i = 0 ; i < size ; i ++ ) { narr [ offset + i ] = arr [ i ] ; } arr = narr ; } }
!!! all methods that use this method must be sync enlarge the offset if 0