|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.util.BitField
public class BitField
A list of bits.
Constructor Summary | |
---|---|
BitField()
|
Method Summary | |
---|---|
void |
clear(int i)
Set bit at the given index to 'false'. |
boolean |
get(int i)
Get the bit at the given index. |
int |
getByte(int i)
Get the next 8 bits at the given index. |
int |
getLastSetBit()
Get the index of the last bit that is set. |
long |
getLong(int i)
Get the bit mask of the bits at the given index. |
int |
nextClearBit(int fromIndex)
Get the index of the next bit that is not set. |
int |
nextSetBit(int fromIndex)
Get the index of the next bit that is set. |
void |
set(int i)
Set bit at the given index to 'true'. |
void |
setByte(int i,
int x)
Combine the next 8 bits at the given index with OR. |
void |
setRange(int start,
int len,
boolean value)
Enable or disable a number of bits. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BitField()
Method Detail |
---|
public int getLastSetBit()
public int nextSetBit(int fromIndex)
fromIndex
- where to start searching
public int nextClearBit(int fromIndex)
fromIndex
- where to start searching
public long getLong(int i)
i
- the index (must be a multiple of 64)
public boolean get(int i)
i
- the index
public int getByte(int i)
i
- the index
public void setByte(int i, int x)
i
- the indexx
- the next 8 bits (0 - 255)public void set(int i)
i
- the indexpublic void clear(int i)
i
- the indexpublic void setRange(int start, int len, boolean value)
start
- the index of the first bit to enable or disablelen
- the number of bits to enable or disablevalue
- the new value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |