private void ensureCapacity(int unitsRequired){
  if (bits.length < unitsRequired) {
    int request=Math.max(2 * bits.length,unitsRequired);
    long[] newBits=new long[request];
    System.arraycopy(bits,0,newBits,0,unitsInUse);
    bits=newBits;
  }
}

private void ensureCapacity ( int unitsRequired ) { if ( bits . length < unitsRequired ) { int request = Math . max ( 2 * bits . length , unitsRequired ) ; long [ ] newBits = new long [ request ] ; System . arraycopy ( bits , 0 , newBits , 0 , unitsInUse ) ; bits = newBits ; } }
ensures that the bitset can hold enough units .
