Package nxt.ms
Enum Class CurrencyType
- All Implemented Interfaces:
Serializable,Comparable<CurrencyType>,Constable
Define and validate currency capabilities
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTransfers are only allowed from/to issuer account
Only issuer account can publish exchange offerCan be exchanged from/to coinsCan be minted using proof of work algorithmSeveral accounts can shuffle their currency units and then distributed to recipientsCan be reserved before the currency is active, reserve is distributed to founders once the currency becomes active -
Method Summary
Modifier and TypeMethodDescriptionstatic CurrencyTypeget(int code) intgetCode()static voidvalidate(Currency currency, Transaction transaction) static CurrencyTypeReturns the enum constant of this class with the specified name.static CurrencyType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXCHANGEABLE
Can be exchanged from/to coins -
CONTROLLABLE
Transfers are only allowed from/to issuer account
Only issuer account can publish exchange offer -
RESERVABLE
Can be reserved before the currency is active, reserve is distributed to founders once the currency becomes active -
CLAIMABLE
-
MINTABLE
Can be minted using proof of work algorithm -
NON_SHUFFLEABLE
Several accounts can shuffle their currency units and then distributed to recipients
-
-
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
-
getCode
public int getCode() -
get
-
validate
public static void validate(Currency currency, Transaction transaction) throws NxtException.ValidationException - Throws:
NxtException.ValidationException
-