public abstract class Amount extends JSONParsable
Modifier and Type | Field and Description |
---|---|
protected AmountType |
type |
Modifier | Constructor and Description |
---|---|
protected |
Amount(AmountType type) |
Modifier and Type | Method and Description |
---|---|
void |
convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder)
Method that should set the objects property to Json representation.
|
AmountType |
getType() |
static Amount |
parseAmountObject(javax.json.JsonObject jsonObject)
Help method to parse a JSON amount depending on its type field, fiat and cryptoamount.
|
add, 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, parseJson, toJson, toJsonAsString, toString
protected AmountType type
protected Amount(AmountType type)
public AmountType getType()
public void convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder) throws javax.json.JsonException
convertToJson
in class JSONParsable
jsonObjectBuilder
- the json object build to use to set key/values in jsonjavax.json.JsonException
- if problems occurred converting object to JSON.public static Amount parseAmountObject(javax.json.JsonObject jsonObject) throws javax.json.JsonException
jsonObject
- the json object to convert to an amount.javax.json.JsonException
- if problems occurred parsing the json.