public abstract class Maths extends Object
| 构造器和说明 |
|---|
Maths() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
bit(String s)
Convert a binary string to a integer
|
static int |
extract(int bs,
int low,
int high)
Get part of one integer as a new integer
|
static boolean |
isMask(int bs,
int mask)
Test current bit is match the given mask at least one bit or not.
|
static boolean |
isMaskAll(int bs,
int mask)
Test current bit is all match the give mask.
|
static boolean |
isNoMask(int bs,
int mask) |
static int |
max(int... nums)
返回最大的一个
|
static int |
min(int... nums)
返回最小的一个
|
public static int max(int... nums)
nums - public static int min(int... nums)
nums - public static int bit(String s)
s - binary stringpublic static boolean isMask(int bs,
int mask)
bs - integer, bit mapmask - another bit mappublic static boolean isNoMask(int bs,
int mask)
public static boolean isMaskAll(int bs,
int mask)
bs - integer, bit mapmask - another bit mappublic static int extract(int bs,
int low,
int high)
bs - original integerlow - the low bit position (inclusive), 0 basehigh - the hight bit position (exclusive), 0 baseCopyright © 2014. All rights reserved.