(int pos)
| 604 | /// |
| 605 | /// - #flip(int, int) |
| 606 | public void flip(int pos) { |
| 607 | if (pos < 0) { |
| 608 | throw new IndexOutOfBoundsException("" + pos); |
| 609 | } |
| 610 | |
| 611 | int len = (pos >> OFFSET) + 1; |
| 612 | if (len > bits.length) { |
| 613 | growLength(len); |
| 614 | } |
| 615 | bits[len - 1] ^= TWO_N_ARRAY[pos & RIGHT_BITS]; |
| 616 | if (len > actualArrayLength) { |
| 617 | actualArrayLength = len; |
| 618 | } |
| 619 | isLengthActual = !((actualArrayLength > 0) && (bits[actualArrayLength - 1] == 0)); |
| 620 | needClear(); |
| 621 | } |
| 622 | |
| 623 | /// Flips the bits starting from `pos1` to `pos2`. Grows the |
| 624 | /// `BitSet` if `pos2 > size`. |
nothing calls this directly
no test coverage detected