| Modifier and Type | Field and Description |
|---|---|
| pack-priv long[] |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Bits(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 0 through nbits-1. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| private void | |
| public void | |
| public void | |
| public boolean | Returns: boolean indicating whether this bit set is a super set of the specified seta bit set other)Returns true if this bit set is a super set of the specified set, i.e. it has all bits set to true that are also set to true in the specified BitSet. |
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public void | |
| public boolean | |
| public boolean | Returns: whether the bit was set before invocationthe index of the bit index)Returns the bit at the given index and clears it in one go. |
| public boolean | Returns: whether the bit was set before invocationthe index of the bit index)Returns the bit at the given index and sets it in one go. |
| public int | |
| public boolean | Returns: boolean indicating whether this bit set intersects the specified bit seta bit set other)Returns true if the specified BitSet has any bits set to true that are also set to true in this BitSet. |
| public boolean | |
| public int | Returns: the logical size of this bitsetReturns the "logical size" of this bitset: the index of the highest set bit in the bitset plus one. |
| public int | nextClearBit(int fromIndex)
Returns the index of the first bit that is set to false that occurs on or after the specified starting index. |
| public int | nextSetBit(int fromIndex)
Returns the index of the first bit that is set to true that occurs on or after the specified starting index. |
| public boolean | |
| public int | |
| public void | |
| public void | |
| public void |
| bits | back to summary |
|---|---|
| pack-priv long[] bits | |
| Bits | back to summary |
|---|---|
| public Bits() | |
| Bits | back to summary |
|---|---|
| public Bits(int nbits) Creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range 0 through nbits-1.
| |
| Bits | back to summary |
|---|---|
| public Bits(Bits bitsToCpy) Creates a bit set from another bit set
| |
| and | back to summary |
|---|---|
| public void and(Bits other) 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 true if and only if it both initially had the value true and the corresponding bit in the bit set argument also had the value true.
| |
| andNot | back to summary |
|---|---|
| public void andNot(Bits other) Clears all of the bits in this bit set whose corresponding bit is set in the specified bit set.
| |
| checkCapacity | back to summary |
|---|---|
| private void checkCapacity(int len) | |
| clear | back to summary |
|---|---|
public void clear(int index)
| |
| clear | back to summary |
|---|---|
| public void clear() Clears the entire bitset | |
| containsAll | back to summary |
|---|---|
| public boolean containsAll(Bits other) Returns true if this bit set is a super set of the specified set, i.e. it has all bits set to true that are also set to true in the specified BitSet.
| |
| equals | back to summary |
|---|---|
| public boolean equals(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 void flip(int index)
| |
| get | back to summary |
|---|---|
public boolean get(int index)
| |
| getAndClear | back to summary |
|---|---|
| public boolean getAndClear(int index) Returns the bit at the given index and clears it in one go.
| |
| getAndSet | back to summary |
|---|---|
| public boolean getAndSet(int index) Returns the bit at the given index and sets it in one go.
| |
| 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(Bits other) Returns true if the specified BitSet has any bits set to true that are also set to true in this BitSet.
| |
| isEmpty | back to summary |
|---|---|
public boolean isEmpty()
| |
| length | back to summary |
|---|---|
| public int length() Returns the "logical size" of this bitset: the index of the highest set bit in the bitset plus one. Returns zero if the bitset contains no set bits.
| |
| nextClearBit | back to summary |
|---|---|
| public int nextClearBit(int fromIndex) Returns the index of the first bit that is set to false that occurs on or after the specified starting index. | |
| nextSetBit | back to summary |
|---|---|
| public int nextSetBit(int fromIndex) 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. | |
| notEmpty | back to summary |
|---|---|
public boolean notEmpty()
| |
| numBits | back to summary |
|---|---|
public int numBits()
| |
| or | back to summary |
|---|---|
| public void or(Bits other) 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 true if and only if it either already had the value true or the corresponding bit in the bit set argument has the value true.
| |
| set | back to summary |
|---|---|
public void set(int index)
| |
| xor | back to summary |
|---|---|
| public void xor(Bits other) 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 true if and only if one of the following statements holds:
| |