public void flipBit ( int index ) { assertValidIndex ( index ) ; int word = index / WORD_LENGTH ; int offset = index % WORD_LENGTH ; data [ word ] ^= ( 1 << offset ) ; }
Inverts the value of the bit at the specified index .