public class Asset extends Object implements ByteTransformable
| Constructor and Description |
|---|
Asset(BigDecimal amount,
AssetSymbolType name)
Create a new asset object by providing all required fields.
|
Asset(BigDecimal amount,
String name,
org.joou.UInteger precision)
Create a new asset object by providing all required fields.
|
Asset(long amount,
AssetSymbolType name)
Create a new asset object by providing all required fields.
|
Asset(long amount,
String name,
org.joou.UInteger precision)
Create a new asset object by providing all required fields.
|
| Modifier and Type | Method and Description |
|---|---|
static Asset |
createSmtAsset(BigDecimal amount,
String name)
Create a new asset object by providing all required fields.
|
boolean |
equals(Object otherAsset) |
Long |
getAmount()
Get the amount stored in this asset object.
|
String |
getName()
Get the name for this asset object.
|
org.joou.UInteger |
getPrecision()
Get the precision of this asset object.
|
int |
hashCode() |
void |
setAmount(BigDecimal amount)
Set the amount of this asset.
|
void |
setAmount(long amount)
Set the amount of this asset.
|
void |
setAmount(String amount) |
void |
setName(String name)
Set the name of this asset.
|
void |
setPrecision(org.joou.UInteger precision)
Set the precision of this asset.
|
void |
setSymbol(AssetSymbolType symbol)
Set the name of this asset.
|
byte[] |
toByteArray()
Covert the operation into a byte array.
|
BigDecimal |
toReal()
Transform this asset into its
BigDecimal representation. |
String |
toString() |
public Asset(BigDecimal amount, AssetSymbolType name)
amount - The amount.name - One type of
AssetSymbolType.public Asset(long amount,
AssetSymbolType name)
amount - The amount.name - One type of
AssetSymbolType.public Asset(BigDecimal amount, String name, org.joou.UInteger precision)
amount - The amount.name - String.precision - The precision of asset.public Asset(long amount,
String name,
org.joou.UInteger precision)
amount - The amount.name - String.precision - The precision of asset.public static Asset createSmtAsset(BigDecimal amount, String name) throws BeowulfCommunicationException, BeowulfResponseException, BeowulfInvalidTransactionException
amount - The amount.name - String.BeowulfCommunicationException - The BeowulfCommunicationException.BeowulfResponseException - The BeowulfResponseException.BeowulfInvalidTransactionException - The BeowulfInvalidTransactionException.public Long getAmount()
public void setAmount(long amount)
amount - The amount.public void setAmount(BigDecimal amount)
amount - The amount.public void setAmount(String amount)
public org.joou.UInteger getPrecision()
public void setPrecision(org.joou.UInteger precision)
precision - One type of
AssetSymbolType.public String getName()
public void setName(String name)
name - One type of
AssetSymbolType.public void setSymbol(AssetSymbolType symbol)
symbol - One type of
AssetSymbolType.public BigDecimal toReal()
BigDecimal representation.BigDecimal representation.public byte[] toByteArray()
throws BeowulfInvalidTransactionException
ByteTransformabletoByteArray in interface ByteTransformableBeowulfInvalidTransactionException - If there was a problem while transforming the transaction
into a byte array.Copyright © 2019. All rights reserved.