Lines Matching defs:bits
21 private long[] bits;
23 private static final int ELM_SIZE = 64; // Size in bits of the data type
25 // being used in the bits array
28 * Create a new BitSet with size equal to 64 bits
30 * @return The number of bits contained in this BitSet.
51 bits = new long[(nbits / ELM_SIZE) + (nbits % ELM_SIZE > 0 ? 1 : 0)];
69 if (pos < bits.length * ELM_SIZE) {
70 bits[pos / ELM_SIZE] &= ~(1L << (pos % ELM_SIZE));
94 if (pos < bits.length * ELM_SIZE) {
95 return (bits[pos / ELM_SIZE] & (1L << (pos % ELM_SIZE))) != 0;
103 * Increase the size of the internal array to accomodate pos bits. The new
113 System.arraycopy(bits, 0, tempBits, 0, bits.length);
114 bits = tempBits;
129 if (pos >= bits.length * ELM_SIZE) {
132 bits[pos / ELM_SIZE] |= 1L << (pos % ELM_SIZE);
141 * @return The number of bits contained in this BitSet.
148 return bits.length * ELM_SIZE;
155 * @return A comma delimited list of the indices of all bits that are set.
159 StringBuffer sb = new StringBuffer(bits.length / 2);
163 for (long element : bits) {
184 * Returns the number of bits up to and including the highest bit set.
188 int idx = bits.length - 1;
189 while (idx >= 0 && bits[idx] == 0) {
196 long val = bits[idx];