Constructor and Description |
---|
NumUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
is32bit(long x) |
static boolean |
isByte(int x)
Determines if a given
int value is the range of signed byte values. |
static boolean |
isByte(long l)
Determines if a given
long value is the range of signed byte values. |
static boolean |
isInt(long l)
Determines if a given
long value is the range of signed int values. |
static boolean |
isShiftCount(int x) |
static boolean |
isShort(int x)
Determines if a given
int value is the range of signed short values. |
static boolean |
isShort(long x)
Determines if a given
long value is the range of signed short values. |
static boolean |
isUByte(int x)
Determines if a given
int value is the range of unsigned byte values. |
static boolean |
isUByte(long x)
Determines if a given
long value is the range of unsigned byte values. |
static boolean |
isUInt(long x)
Determines if a given
long value is the range of unsigned int values. |
static boolean |
isUShort(int s) |
static boolean |
isUShort(long s) |
static int |
roundUp(int number,
int mod) |
static long |
roundUp(long number,
long mod) |
static short |
safeToShort(int v) |
public NumUtil()
public static boolean isShiftCount(int x)
public static boolean isUByte(int x)
int
value is the range of unsigned byte values.public static boolean isByte(int x)
int
value is the range of signed byte values.public static boolean isUByte(long x)
long
value is the range of unsigned byte values.public static boolean isByte(long l)
long
value is the range of signed byte values.public static boolean isUInt(long x)
long
value is the range of unsigned int values.public static boolean isInt(long l)
long
value is the range of signed int values.public static boolean isShort(int x)
int
value is the range of signed short values.public static boolean isShort(long x)
long
value is the range of signed short values.public static boolean isUShort(int s)
public static boolean isUShort(long s)
public static boolean is32bit(long x)
public static short safeToShort(int v)
public static int roundUp(int number, int mod)
public static long roundUp(long number, long mod)