Package org.hyperledger.besu.plugin.data
Interface Quantity
-
public interface Quantity
An interface to mark objects that also represents a disceete quantity, such as an unsigned integer value.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Number
getValue()
Returns the numeric value of the quantity.java.lang.String
toHexString()
The value as a hexadecimal string.
-
-
-
Method Detail
-
getValue
java.lang.Number getValue()
Returns the numeric value of the quantity.The specific class returned may be the boxed Java primitives, however plugin authors should not rely on the underlying number always being castable to that primitive in all cases and should instead rely on APIs such as
Number.longValue()
to cast to primitive values. Similarly the underlying object based values may evolve over time.- Returns:
- The boxed or object based value of the quantity.
-
toHexString
java.lang.String toHexString()
The value as a hexadecimal string.- Returns:
- This value represented as hexadecimal, starting with "0x".
-
-