|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.engine.impl.util.BitMaskUtil
public class BitMaskUtil
Util class for manipulating bit-flag in ints. Currently, only 8-bits are supporten, but can be extended to use all 31 bits in the integer (1st of 32 bits is used for sign).
| Constructor Summary | |
|---|---|
BitMaskUtil()
|
|
| Method Summary | |
|---|---|
static int |
getMaskForBit(int bitNumber)
|
static boolean |
isBitOn(int value,
int bitNumber)
Check if the bit is set to '1' |
static int |
setBit(int value,
int bitNumber,
boolean bitValue)
Set bit to '0' or '1' in the given int. |
static int |
setBitOff(int value,
int bitNumber)
Set bit to '0' in the given int. |
static int |
setBitOn(int value,
int bitNumber)
Set bit to '1' in the given int. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BitMaskUtil()
| Method Detail |
|---|
public static int setBitOn(int value,
int bitNumber)
current - integer valuebitNumber - number of the bit to set to '1' (right first bit starting at 1).
public static int setBitOff(int value,
int bitNumber)
current - integer valuebitNumber - number of the bit to set to '0' (right first bit starting at 1).
public static boolean isBitOn(int value,
int bitNumber)
value - integer to check bitnumber - of bit to check (right first bit starting at 1)
public static int setBit(int value,
int bitNumber,
boolean bitValue)
current - integer valuebitNumber - number of the bit to set to '0' or '1' (right first bit starting at 1).bitValue - if true, bit set to '1'. If false, '0'.public static int getMaskForBit(int bitNumber)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||