private void ensureCapacity ( int wordsRequired ) { if ( words . length < wordsRequired ) { // Allocate larger of doubled size or required size int request = Math . max ( 2 * words . length , wordsRequired ) ; words = Arrays . copyOf ( words , request ) ; sizeIsSticky = false ; } }
Ensures that the BitSet can hold enough words .