|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectorg.activiti.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).
构造方法摘要 | |
---|---|
BitMaskUtil()
|
方法摘要 | |
---|---|
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. |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public BitMaskUtil()
方法详细信息 |
---|
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'.
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |