private static void flipMaskedWord ( int [ ] array , int index , int from , int to ) { if ( from == to ) { return ; } to = 32 - to ; int word = wordAt ( array , index ) ; word ^= ( ( 0xffffffff >>> from ) << ( from + to ) ) >>> to ; array [ index ] = word & WORD_MASK ; }
Flips all bits in a word within the given range .