public synchronized void ensureCapacity(int minimumCapacity){
  if (elementData.length < minimumCapacity) {
    int next=(capacityIncrement <= 0 ? elementData.length : capacityIncrement) + elementData.length;
    grow(minimumCapacity > next ? minimumCapacity : next);
  }
}

public synchronized void ensureCapacity ( int minimumCapacity ) { if ( elementData . length < minimumCapacity ) { int next = ( capacityIncrement <= 0 ? elementData . length : capacityIncrement ) + elementData . length ; grow ( minimumCapacity > next ? minimumCapacity : next ) ; } }
ensures that this vector can hold the specified number of elements without growing .
