question: public void ensureCapacity ( int minCapacity ) { int oldCapacity = capacity ; if ( minCapacity > oldCapacity ) { int newCapacity = ( oldCapacity * 3 ) / 2 + 1 ; if ( newCapacity < minCapacity ) newCapacity = minCapacity ; BitVector vector = toBitVector ( ) ; vector . setSize ( newCapacity * bitsPerElement ) ; this . bits = vector . elements ( ) ; this . capacity = newCapacity ; } }
target:  Ensures that the receiver can hold at least the specified number of elements without needing to allocate new internal memory. If necessary, allocates new internal memory and increases the capacity of the receiver.