public interface IStateBitSet
Modifier and Type | Method and Description |
---|---|
void |
and(IStateBitSet other)
Deprecated.
|
void |
andNot(IStateBitSet other)
Deprecated.
|
int |
capacity()
Deprecated.
|
int |
cardinality()
Number of bits on.
|
void |
clear()
Remove all bits;
|
void |
clear(int bitIndex)
Puts the specified bit off.
|
void |
clear(int fromIndex,
int toIndex) |
IStateBitSet |
copy()
Deprecated.
|
BitSet |
copyToBitSet()
Deprecated.
|
void |
flip(int bitIndex)
Deprecated.
|
void |
flip(int fromIndex,
int toIndex)
Deprecated.
|
boolean |
get(int bitIndex) |
boolean |
intersects(IStateBitSet setI)
Deprecated.
|
boolean |
isEmpty() |
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. |
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. |
void |
or(IStateBitSet other)
Deprecated.
|
int |
prevClearBit(int fromIndex)
Returns the index of the first bit that is set to
false
that occurs on or before the specified starting index. |
int |
prevSetBit(int fromIndex)
Returns the index of the first bit that is set to
true
that occurs on or before the specified starting index. |
void |
set(int bitIndex)
Puts the specified bit on.
|
void |
set(int index,
boolean value) |
void |
set(int fromIdex,
int toIndex) |
int |
size()
Size of the bitset
|
void |
xor(IStateBitSet other)
Deprecated.
|
int cardinality()
int size()
void set(int bitIndex)
bitIndex
- the bit to put onvoid clear(int bitIndex)
bitIndex
- the bit to put offvoid clear()
void clear(int fromIndex, int toIndex)
void set(int index, boolean value)
void set(int fromIdex, int toIndex)
boolean get(int bitIndex)
int nextSetBit(int fromIndex)
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
}fromIndex
- the index to start checking from (inclusive).IndexOutOfBoundsException
- if the specified index is negative.int nextClearBit(int fromIndex)
false
that occurs on or after the specified starting index.fromIndex
- the index to start checking from (inclusive).IndexOutOfBoundsException
- if the specified index is negative.int prevSetBit(int fromIndex)
true
that occurs on or before the specified starting index. If no such
bit exists then -1 is returned.fromIndex
- the index to start checking from (inclusive).IndexOutOfBoundsException
- if the specified index is
negative or too largeint prevClearBit(int fromIndex)
false
that occurs on or before the specified starting index. If no such
bit exists then -1 is returned.fromIndex
- the index to start checking from (inclusive).IndexOutOfBoundsException
- if the specified index is
negative or too large@Deprecated int capacity()
@Deprecated IStateBitSet copy()
@Deprecated BitSet copyToBitSet()
@Deprecated void or(IStateBitSet other)
@Deprecated void and(IStateBitSet other)
@Deprecated void xor(IStateBitSet other)
@Deprecated void andNot(IStateBitSet other)
@Deprecated boolean intersects(IStateBitSet setI)
@Deprecated void flip(int bitIndex)
@Deprecated void flip(int fromIndex, int toIndex)
boolean isEmpty()
Copyright © 2017. All rights reserved.