Package foundation.omni.money
Enum Class OmniCurrencyCode
- All Implemented Interfaces:
Serializable
,Comparable<OmniCurrencyCode>
,java.lang.constant.Constable
CurrencyCode for base and popular OMNI currencies
Base is OMNI and TOMNI
Others are currencies with market cap over 1M and listed on exchanges
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic CurrencyID
id()
static Optional
<OmniCurrencyCode> idToCode
(CurrencyID id) Generate a OmniCurrencyCode for an Omni CurrencyIDstatic String
Generate a currency code string from an Omni CurrencyIDstatic Optional
<OmniCurrencyCode> stringToCode
(String string) type()
static OmniCurrencyCode
Returns the enum constant of this class with the specified name.static OmniCurrencyCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BTC
-
OMNI
-
TOMNI
-
MAID
-
USDT
-
AMP
-
SAFEX
-
AGRS
-
PDC
-
-
Field Details
-
realEcosystemPrefix
- See Also:
-
testEcosystemPrefix
- See Also:
-
-
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
-
id
-
type
-
idToCodeString
Generate a currency code string from an Omni CurrencyID- Parameters:
id
- CurrencyID to convert- Returns:
- An enumerated code if available, or OMNI_SPT#nnn, or TOMNI_SPT#nnn
-
idToCode
Generate a OmniCurrencyCode for an Omni CurrencyID- Parameters:
id
- CurrencyID to lookup- Returns:
- An enumerated code if available, empty otherwise
-
stringToCode
-
codeToId
-