(int pos)
| 362 | /// |
| 363 | /// - #clear(int, int) |
| 364 | public void set(int pos) { |
| 365 | if (pos < 0) { |
| 366 | throw new IndexOutOfBoundsException("" + pos); |
| 367 | } |
| 368 | |
| 369 | int len = (pos >> OFFSET) + 1; |
| 370 | if (len > bits.length) { |
| 371 | growLength(len); |
| 372 | } |
| 373 | bits[len - 1] |= TWO_N_ARRAY[pos & RIGHT_BITS]; |
| 374 | if (len > actualArrayLength) { |
| 375 | actualArrayLength = len; |
| 376 | isLengthActual = true; |
| 377 | } |
| 378 | needClear(); |
| 379 | } |
| 380 | |
| 381 | /// Sets the bit at index `pos` to `val`. Grows the |
| 382 | /// `BitSet` if `pos > size`. |
nothing calls this directly
no test coverage detected