public void ensureCapacity(int minCapacity){
  minCapacity=Math.max(4,minCapacity);
  if (minCapacity >= data.length) {
    int[] d=new int[minCapacity];
    System.arraycopy(data,0,d,0,data.length);
    data=d;
  }
}

public void ensureCapacity ( int minCapacity ) { minCapacity = Math . max ( 4 , minCapacity ) ; if ( minCapacity >= data . length ) { int [ ] d = new int [ minCapacity ] ; System . arraycopy ( data , 0 , d , 0 , data . length ) ; data = d ; } }
ensure the the underlying array is large enough for the given number of entries .
