(BitSet otherBits)
| 161 | } |
| 162 | |
| 163 | public boolean intersects(BitSet otherBits) { |
| 164 | int max = Math.max(bits.length, otherBits.bits.length); |
| 165 | for (int i = 0; i < max; i++) { |
| 166 | if ((bits[i] & otherBits.bits[i]) != 0) { |
| 167 | return true; |
| 168 | } |
| 169 | } |
| 170 | return false; |
| 171 | } |
| 172 | |
| 173 | public int length() { |
| 174 | return bits.length << BITS_PER_LONG_SHIFT; |