Package icu.congee.id.generator.broid
Class BitUtils
java.lang.Object
icu.congee.id.generator.broid.BitUtils
位操作工具类
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]listToByteArray(List<Boolean> booleanList) 将List<Boolean>转换为byte数组static longlistToLong(List<Boolean> booleanList) 将List<Boolean>转换为long值longToList(long value, int bits) 将long值转换为List<Boolean>
-
Constructor Details
-
BitUtils
public BitUtils()
-
-
Method Details
-
longToList
将long值转换为List<Boolean>- Parameters:
value- long值bits- 位数- Returns:
- List<Boolean>对象
-
listToByteArray
将List<Boolean>转换为byte数组- Parameters:
booleanList- List<Boolean>对象- Returns:
- byte数组
-
listToLong
将List<Boolean>转换为long值- Parameters:
booleanList- List<Boolean>对象- Returns:
- long值
-