org.apache.spark.util.collection
Compute the bit-wise AND of the two sets returning the result.
Compute the symmetric difference by performing bit-wise XOR of the two sets returning the result.
Compute the difference of the two sets by performing bit-wise AND-NOT returning the result.
Compute the capacity (number of bits) that can be represented by this bitset.
Return the number of bits set to true in this BitSet.
Return the value of the bit with the specified index.
Return the value of the bit with the specified index. The value is true if the bit with the index is currently set in this BitSet; otherwise, the result is false.
the bit index
the value of the bit with the specified index
Get an iterator over the set bits.
Returns the index of the first bit that is set to true that occurs on or after the specified starting index.
Returns the index of the first bit that is set to true that occurs on or after the specified starting index. If no such bit exists then -1 is returned.
To iterate over the true bits in a BitSet, use the following loop:
for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i+1)) { // operate on index i here }
the index to start checking from (inclusive)
the index of the next set bit, or -1 if there is no such bit
Sets the bit at the specified index to true.
Sets the bit at the specified index to true.
the bit index
Set all the bits up to a given index
Compute the bit-wise OR of the two sets returning the result.
A simple, fixed-size bit set implementation. This implementation is fast because it avoids safety/bound checking.