Package ghidra.util
Class NumberUtil
- java.lang.Object
-
- ghidra.util.NumberUtil
-
public class NumberUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
UNSIGNED_BYTE_MASK
static long
UNSIGNED_INT_MASK
static int
UNSIGNED_SHORT_MASK
-
Constructor Summary
Constructors Constructor Description NumberUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
equalsMaxUnsignedValue(java.lang.Number value)
Compare to the maximum unsigned value that the current number is holding.static java.lang.Number
getUnsignedValue(java.lang.Number value)
Get the unsigned value of a number.
-
-
-
Field Detail
-
UNSIGNED_BYTE_MASK
public static final int UNSIGNED_BYTE_MASK
- See Also:
- Constant Field Values
-
UNSIGNED_SHORT_MASK
public static final int UNSIGNED_SHORT_MASK
- See Also:
- Constant Field Values
-
UNSIGNED_INT_MASK
public static final long UNSIGNED_INT_MASK
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUnsignedValue
public static java.lang.Number getUnsignedValue(java.lang.Number value)
Get the unsigned value of a number.- Parameters:
value
- the value stored in a signed number- Returns:
- the unsigned value of the number
-
equalsMaxUnsignedValue
public static boolean equalsMaxUnsignedValue(java.lang.Number value)
Compare to the maximum unsigned value that the current number is holding.- Parameters:
value
- the value stored in a signed number- Returns:
- true if equal to the maximum and false otherwise
-
-