Package org.hyperledger.besu.plugin.data
Interface Quantity
-
- All Superinterfaces:
BinaryData
public interface Quantity extends BinaryData
An interface to mark theBinaryData
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.-
Methods inherited from interface org.hyperledger.besu.plugin.data.BinaryData
getByteArray, getHexString, size
-
-
-
-
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.
-
-