Append another value to to the bitset.
Append another value to to the bitset.
This method modifies the builder's internal state. It corresponds to the membership status (true/false) of the "next" integer value. The caller is expected to be independently tracking this information.
Reset the builder's internal state.
Reset the builder's internal state.
If you want to reuse a builder which has already been modified with += or .result(), you will need to call this method first.
Finalize the builder, and return a bitset.
Finalize the builder, and return a bitset.
This method modifies the internal state. Thus, it is NOT safe to call this multiple times to construct the "same" bitset.
After calling this method, the only safe method to call is .clear().
This class is used to construct an IndexedBitSet.
Unlike IndexedBitSet it is mutable. It's internal state consists of the "in-progress" bitset.
It expects to consume a sequence of true/false values (using the += method). The first value corresponds to 0, the second 1, the third 2, and so on.
For example:
val b = IndexedBitSet.newBuilder b += false b += true b += false b.result() // produces IndexedBitSet(010)
If you need to reuse a builder, you must call
.clear()
first to reset its internal state.