- All Implemented Interfaces:
Serializable,Comparable<HbarUnit>,Constable
Common units of hbar; for the most part they follow SI prefix conventions.
See Hedera Documentation
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEquivalent to 1 billion hbar or 100 quadillion tinybar.The base unit of hbar, equivalent to 100 million tinybar.Equivalent to 1 thousand hbar or 100 billion tinybar.Equivalent to 1 million hbar or 100 trillion tinybar.Equivalent to 100 tinybar or 1⁄1,000,000 hbar.Equivalent to 100,000 tinybar or 1⁄1,000 hbar.The atomic (smallest) unit of hbar, used natively by the Hedera network. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGet the preferred symbol of the current unit.toString()Get the name of this unit.static HbarUnitReturns the enum constant of this class with the specified name.static HbarUnit[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TINYBAR
The atomic (smallest) unit of hbar, used natively by the Hedera network.It is equivalent to 1⁄100,000,000 hbar.
-
MICROBAR
Equivalent to 100 tinybar or 1⁄1,000,000 hbar. -
MILLIBAR
Equivalent to 100,000 tinybar or 1⁄1,000 hbar. -
HBAR
The base unit of hbar, equivalent to 100 million tinybar. -
KILOBAR
Equivalent to 1 thousand hbar or 100 billion tinybar. -
MEGABAR
Equivalent to 1 million hbar or 100 trillion tinybar. -
GIGABAR
Equivalent to 1 billion hbar or 100 quadillion tinybar.The maximum hbar amount supported by Hedera in any context is ~92 gigabar (263 tinybar); use this unit sparingly.
-
-
Field Details
-
tinybar
final long tinybar
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getSymbol
Get the preferred symbol of the current unit.E.g.
TINYBAR.getSymbol() returns "tℏ".- Returns:
- the symbol
-
toString
Get the name of this unit.
-