Package ghidra.util
Class NumberUtil
java.lang.Object
ghidra.util.NumberUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final long
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
equalsMaxUnsignedValue
(Number value) Compare to the maximum unsigned value that the current number is holding.static Number
getUnsignedValue
(Number value) Get the unsigned value of a number.
-
Field Details
-
UNSIGNED_BYTE_MASK
public static final int UNSIGNED_BYTE_MASK- See Also:
-
UNSIGNED_SHORT_MASK
public static final int UNSIGNED_SHORT_MASK- See Also:
-
UNSIGNED_INT_MASK
public static final long UNSIGNED_INT_MASK- See Also:
-
-
Constructor Details
-
NumberUtil
public NumberUtil()
-
-
Method Details
-
getUnsignedValue
Get the unsigned value of a number.- Parameters:
value
- the value stored in a signed number- Returns:
- the unsigned value of the number
-
equalsMaxUnsignedValue
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
-