public class FiatAmount extends Amount
| Constructor and Description |
|---|
FiatAmount()
Empty Constructor
|
FiatAmount(double value,
java.lang.String currencyCode)
Default Constructor with a value and a currencyCode.
|
FiatAmount(javax.json.JsonObject jsonObject)
JSON Parseable constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder)
Method that should set the objects property to Json representation.
|
java.lang.String |
getCurrencyCode() |
double |
getValue() |
void |
parseJson(javax.json.JsonObject jsonObject)
Method to read all properties from a JsonObject into this value object.
|
void |
setCurrencyCode(java.lang.String currencyCode) |
void |
setValue(double value) |
getType, parseAmountObjectadd, addB58, addNotRequired, addNotRequiredB58, getBoolean, getBooleanIfSet, getByteArrayFromB58, getByteArrayFromB58IfSet, getByteArrayFromB64, getByteArrayFromB64IfSet, getByteArrayFromHex, getByteArrayFromHexIfSet, getDate, getDateIfSet, getDouble, getDoubleIfSet, getInt, getIntIfSet, getJsonArray, getJsonArrayIfSet, getJsonObject, getJsonObjectIfSet, getLong, getLongIfSet, getString, getStringIfSet, toJson, toJsonAsString, toStringpublic FiatAmount()
public FiatAmount(double value,
java.lang.String currencyCode)
value - the value of fiat currency as a double.currencyCode - the related currency code. Make sure it is
supported by the used currency converter.public FiatAmount(javax.json.JsonObject jsonObject)
throws javax.json.JsonException
jsonObject - the jsonObject to parse.javax.json.JsonException - if problems occurred parsing the json data.public double getValue()
public void setValue(double value)
value - the value of fiat currency as a double.public java.lang.String getCurrencyCode()
public void setCurrencyCode(java.lang.String currencyCode)
currencyCode - the related currency code. Make sure it is
supported by the used currency converter.public void convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder)
throws javax.json.JsonException
convertToJson in class AmountjsonObjectBuilder - the json object build to use to set key/values in jsonjavax.json.JsonException - if problems occurred converting object to JSON.public void parseJson(javax.json.JsonObject jsonObject)
throws javax.json.JsonException
parseJson in class JSONParsablejsonObject - the json object to read key and values from and set object properties.javax.json.JsonException - if problems occurred converting object from JSON.