equal
deleted
inserted
replaced
58 * external synchronization. |
58 * external synchronization. |
59 * |
59 * |
60 * @author Arthur van Hoff |
60 * @author Arthur van Hoff |
61 * @author Michael McCloskey |
61 * @author Michael McCloskey |
62 * @author Martin Buchholz |
62 * @author Martin Buchholz |
63 * @since JDK1.0 |
63 * @since 1.0 |
64 */ |
64 */ |
65 public class BitSet implements Cloneable, java.io.Serializable { |
65 public class BitSet implements Cloneable, java.io.Serializable { |
66 /* |
66 /* |
67 * BitSets are packed into arrays of "words." Currently a word is |
67 * BitSets are packed into arrays of "words." Currently a word is |
68 * a long, which consists of 64 bits, requiring 6 address bits. |
68 * a long, which consists of 64 bits, requiring 6 address bits. |
435 /** |
435 /** |
436 * Sets the bit at the specified index to {@code true}. |
436 * Sets the bit at the specified index to {@code true}. |
437 * |
437 * |
438 * @param bitIndex a bit index |
438 * @param bitIndex a bit index |
439 * @throws IndexOutOfBoundsException if the specified index is negative |
439 * @throws IndexOutOfBoundsException if the specified index is negative |
440 * @since JDK1.0 |
440 * @since 1.0 |
441 */ |
441 */ |
442 public void set(int bitIndex) { |
442 public void set(int bitIndex) { |
443 if (bitIndex < 0) |
443 if (bitIndex < 0) |
444 throw new IndexOutOfBoundsException("bitIndex < 0: " + bitIndex); |
444 throw new IndexOutOfBoundsException("bitIndex < 0: " + bitIndex); |
445 |
445 |
531 /** |
531 /** |
532 * Sets the bit specified by the index to {@code false}. |
532 * Sets the bit specified by the index to {@code false}. |
533 * |
533 * |
534 * @param bitIndex the index of the bit to be cleared |
534 * @param bitIndex the index of the bit to be cleared |
535 * @throws IndexOutOfBoundsException if the specified index is negative |
535 * @throws IndexOutOfBoundsException if the specified index is negative |
536 * @since JDK1.0 |
536 * @since 1.0 |
537 */ |
537 */ |
538 public void clear(int bitIndex) { |
538 public void clear(int bitIndex) { |
539 if (bitIndex < 0) |
539 if (bitIndex < 0) |
540 throw new IndexOutOfBoundsException("bitIndex < 0: " + bitIndex); |
540 throw new IndexOutOfBoundsException("bitIndex < 0: " + bitIndex); |
541 |
541 |