Package org.stellar.sdk.xdr
Class Asset
java.lang.Object
org.stellar.sdk.xdr.Asset
Asset's original definition in the XDR file is:
union Asset switch (AssetType type)
{
case ASSET_TYPE_NATIVE: // Not credit
void;
case ASSET_TYPE_CREDIT_ALPHANUM4:
AlphaNum4 alphaNum4;
case ASSET_TYPE_CREDIT_ALPHANUM12:
AlphaNum12 alphaNum12;
// add other asset types here in the future
};
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAsset()Asset(AssetType discriminant, AlphaNum4 alphaNum4, AlphaNum12 alphaNum12) -
Method Summary
Modifier and TypeMethodDescriptionstatic Asset.AssetBuilderbuilder()static Assetdecode(XdrDataInputStream stream) voidencode(XdrDataOutputStream stream) booleanstatic AssetfromXdrBase64(String xdr) static AssetfromXdrByteArray(byte[] xdr) inthashCode()voidsetAlphaNum12(AlphaNum12 alphaNum12) voidsetAlphaNum4(AlphaNum4 alphaNum4) voidsetDiscriminant(AssetType discriminant) toString()default Stringdefault byte[]
-
Constructor Details
-
Asset
public Asset() -
Asset
-
-
Method Details
-
encode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
builder
-
toBuilder
-
getDiscriminant
-
getAlphaNum4
-
getAlphaNum12
-
setDiscriminant
-
setAlphaNum4
-
setAlphaNum12
-
equals
-
hashCode
public int hashCode() -
toString
-
toXdrBase64
- Throws:
IOException
-
toXdrByteArray
- Throws:
IOException
-