BitSet with additional operations.
Originally from Apache Commons VFS with more added to act as a fluent replacement for java..
| Modifier and Type | Field and Description |
|---|---|
| private final BitSet | bitSet
Working BitSet. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | FluentBitSet(final int
the initial size of the bit set. nbits)Creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range |
| Modifier and Type | Method and Description |
|---|---|
| public FluentBitSet | |
| public FluentBitSet | Returns: this instance.a bit set. set)Performs a logical AND of this target bit set with the argument bit set. |
| public FluentBitSet | |
| public FluentBitSet | |
| public BitSet | |
| public int | |
| public FluentBitSet | |
| public FluentBitSet | Returns: this instance.the index of the bit to be cleared. bitIndexArray)Sets the bits specified by the indexes to |
| public FluentBitSet | Returns: this instance.the index of the bit to be cleared. bitIndex)Sets the bit specified by the index to |
| public FluentBitSet | Returns: this instance.index of the first bit to be cleared. fromIndex, final int index after the last bit to be cleared. toIndex)Sets the bits from the specified |
| public Object | Returns: a clone of this bit setOverrides java. Cloning this |
| public boolean | equals(final Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public FluentBitSet | Returns: this instance.the index of the bit to flip. bitIndex)Sets the bit at the specified index to the complement of its current value. |
| public FluentBitSet | Returns: this instance.index of the first bit to flip. fromIndex, final int index after the last bit to flip. toIndex)Sets each bit from the specified |
| public boolean | Returns: the value of the bit with the specified index.the bit index. bitIndex)Gets the value of the bit with the specified index. |
| public FluentBitSet | |
| public int | |
| public boolean | |
| public boolean | intersects(final FluentBitSet
BitSet to intersect with.Returns true if the specified |
| public boolean | |
| public int | |
| public int | Returns: the index of the next clear bit.the index to start checking from (inclusive). fromIndex)Returns the index of the first bit that is set to |
| public int | Returns: the index of the next set bit, or-1 if there is no such bit.the index to start checking from (inclusive). fromIndex)Returns the index of the first bit that is set to |
| public FluentBitSet | |
| public FluentBitSet | Returns: this instance.a bit set. set)Performs a logical OR of this bit set with the bit set arguments. |
| public FluentBitSet | Returns: this instance.a bit set. set)Performs a logical OR of this bit set with the bit set argument. |
| public int | Returns: the index of the previous clear bit, or-1 if there is no such bit.the index to start checking from (inclusive). fromIndex)Returns the index of the nearest bit that is set to |
| public int | Returns: the index of the previous set bit, or-1 if there is no such bitthe index to start checking from (inclusive) fromIndex)Returns the index of the nearest bit that is set to |
| public FluentBitSet | Returns: this instance.a bit index array. bitIndexArray)Sets the bit at the specified indexes to |
| public FluentBitSet | Returns: this instance.a bit index bitIndex)Sets the bit at the specified index to |
| public FluentBitSet | Returns: this instance.a bit index. bitIndex, final boolean a boolean value to set. value)Sets the bit at the specified index to the specified value. |
| public FluentBitSet | Returns: this instance.index of the first bit to be set. fromIndex, final int index after the last bit to be set. toIndex)Sets the bits from the specified |
| public FluentBitSet | Returns: this instance.index of the first bit to be set. fromIndex, final int index after the last bit to be set. toIndex, final boolean value to set the selected bits to. value)Sets the bits from the specified |
| public FluentBitSet | Returns: this instance.index of the first bit to be set fromIndex, final int index of the last bit to be set toIndex)Sets the bits from the specified |
| public int | |
| public IntStream | |
| public byte[] | Returns: a byte array containing a little-endian representation of all the bits in this bit setReturns a new byte array containing all the bits in this bit set. |
| public long[] | Returns: a byte array containing a little-endian representation of all the bits in this bit setReturns a new byte array containing all the bits in this bit set. |
| public String | |
| public FluentBitSet | |
| public FluentBitSet | Returns: this instance.a bit set set)Performs a logical XOR of this bit set with the bit set argument. |
| bitSet | back to summary |
|---|---|
| private final BitSet bitSet Working BitSet. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| FluentBitSet | back to summary |
|---|---|
| public FluentBitSet() Creates a new bit set. All bits are initially | |
| FluentBitSet | back to summary |
|---|---|
| public FluentBitSet(final BitSet set) Creates a new instance for the given bit set.
| |
| FluentBitSet | back to summary |
|---|---|
| public FluentBitSet(final int nbits) Creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range
| |
| and | back to summary |
|---|---|
| public FluentBitSet and(final BitSet set) Performs a logical AND of this target bit set with the argument bit set. This bit set is modified so that each
bit in it has the value
| |
| and | back to summary |
|---|---|
| public FluentBitSet and(final FluentBitSet set) Performs a logical AND of this target bit set with the argument bit set. This bit set is modified so that each
bit in it has the value
| |
| andNot | back to summary |
|---|---|
| public FluentBitSet andNot(final BitSet set) Clears all of the bits in this
| |
| andNot | back to summary |
|---|---|
| public FluentBitSet andNot(final FluentBitSet set) Clears all of the bits in this
| |
| bitSet | back to summary |
|---|---|
| public BitSet bitSet() Gets the wrapped bit set.
| |
| cardinality | back to summary |
|---|---|
| public int cardinality() Returns the number of bits set to
| |
| clear | back to summary |
|---|---|
| public FluentBitSet clear() Sets all of the bits in this BitSet to
| |
| clear | back to summary |
|---|---|
| public FluentBitSet clear(final int... bitIndexArray) Sets the bits specified by the indexes to
| |
| clear | back to summary |
|---|---|
| public FluentBitSet clear(final int bitIndex) Sets the bit specified by the index to
| |
| clear | back to summary |
|---|---|
| public FluentBitSet clear(final int fromIndex, final int toIndex) Sets the bits from the specified
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Cloning this | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| flip | back to summary |
|---|---|
| public FluentBitSet flip(final int bitIndex) Sets the bit at the specified index to the complement of its current value.
| |
| flip | back to summary |
|---|---|
| public FluentBitSet flip(final int fromIndex, final int toIndex) Sets each bit from the specified
| |
| get | back to summary |
|---|---|
| public boolean get(final int bitIndex) Gets the value of the bit with the specified index. The value is
| |
| get | back to summary |
|---|---|
| public FluentBitSet get(final int fromIndex, final int toIndex) Gets a new
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| intersects | back to summary |
|---|---|
| public boolean intersects(final BitSet set) Returns true if the specified | |
| intersects | back to summary |
|---|---|
| public boolean intersects(final FluentBitSet set) Returns true if the specified
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Tests whether if this
| |
| length | back to summary |
|---|---|
| public int length() Returns the "logical size" of this
| |
| nextClearBit | back to summary |
|---|---|
| public int nextClearBit(final int fromIndex) Returns the index of the first bit that is set to
| |
| nextSetBit | back to summary |
|---|---|
| public int nextSetBit(final int fromIndex) Returns the index of the first bit that is set to
To iterate over the
| |
| or | back to summary |
|---|---|
| public FluentBitSet or(final BitSet set) Performs a logical OR of this bit set with the bit set argument. This bit set is modified so that a bit in it
has the value
| |
| or | back to summary |
|---|---|
| public FluentBitSet or(final FluentBitSet... set) Performs a logical OR of this bit set with the bit set arguments. This bit set is modified so that a bit in it
has the value
| |
| or | back to summary |
|---|---|
| public FluentBitSet or(final FluentBitSet set) Performs a logical OR of this bit set with the bit set argument. This bit set is modified so that a bit in it
has the value
| |
| previousClearBit | back to summary |
|---|---|
| public int previousClearBit(final int fromIndex) Returns the index of the nearest bit that is set to
| |
| previousSetBit | back to summary |
|---|---|
| public int previousSetBit(final int fromIndex) Returns the index of the nearest bit that is set to
To iterate over the
| |
| set | back to summary |
|---|---|
| public FluentBitSet set(final int... bitIndexArray) Sets the bit at the specified indexes to
| |
| set | back to summary |
|---|---|
| public FluentBitSet set(final int bitIndex) Sets the bit at the specified index to
| |
| set | back to summary |
|---|---|
| public FluentBitSet set(final int bitIndex, final boolean value) Sets the bit at the specified index to the specified value.
| |
| set | back to summary |
|---|---|
| public FluentBitSet set(final int fromIndex, final int toIndex) Sets the bits from the specified
| |
| set | back to summary |
|---|---|
| public FluentBitSet set(final int fromIndex, final int toIndex, final boolean value) Sets the bits from the specified
| |
| setInclusive | back to summary |
|---|---|
| public FluentBitSet setInclusive(final int fromIndex, final int toIndex) Sets the bits from the specified
| |
| size | back to summary |
|---|---|
| public int size() Returns the number of bits of space actually in use by this
| |
| stream | back to summary |
|---|---|
| public IntStream stream() Returns a stream of indices for which this The bit set must remain constant during the execution of the terminal stream operation. Otherwise, the result of the terminal stream operation is undefined.
| |
| toByteArray | back to summary |
|---|---|
| public byte[] toByteArray() Returns a new byte array containing all the bits in this bit set. More precisely, if:
| |
| toLongArray | back to summary |
|---|---|
| public long[] toLongArray() Returns a new byte array containing all the bits in this bit set. More precisely, if:
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| xor | back to summary |
|---|---|
| public FluentBitSet xor(final BitSet set) Performs a logical XOR of this bit set with the bit set argument. This bit set is modified so that a bit in it
has the value
| |
| xor | back to summary |
|---|---|
| public FluentBitSet xor(final FluentBitSet set) Performs a logical XOR of this bit set with the bit set argument. This bit set is modified so that a bit in it
has the value
| |