Package org.stellar.sdk.xdr
Class ChangeTrustAsset
java.lang.Object
org.stellar.sdk.xdr.ChangeTrustAsset
- All Implemented Interfaces:
XdrElement
ChangeTrustAsset's original definition in the XDR file is:
union ChangeTrustAsset switch (AssetType type)
{
case ASSET_TYPE_NATIVE: // Not credit
void;
case ASSET_TYPE_CREDIT_ALPHANUM4:
AlphaNum4 alphaNum4;
case ASSET_TYPE_CREDIT_ALPHANUM12:
AlphaNum12 alphaNum12;
case ASSET_TYPE_POOL_SHARE:
LiquidityPoolParameters liquidityPool;
// add other asset types here in the future
};
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionChangeTrustAsset(AssetType discriminant, AlphaNum4 alphaNum4, AlphaNum12 alphaNum12, LiquidityPoolParameters liquidityPool) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ChangeTrustAssetdecode(XdrDataInputStream stream) voidencode(XdrDataOutputStream stream) booleanstatic ChangeTrustAssetfromXdrBase64(String xdr) static ChangeTrustAssetfromXdrByteArray(byte[] xdr) inthashCode()voidsetAlphaNum12(AlphaNum12 alphaNum12) voidsetAlphaNum4(AlphaNum4 alphaNum4) voidsetDiscriminant(AssetType discriminant) voidsetLiquidityPool(LiquidityPoolParameters liquidityPool) toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
ChangeTrustAsset
public ChangeTrustAsset() -
ChangeTrustAsset
public ChangeTrustAsset(AssetType discriminant, AlphaNum4 alphaNum4, AlphaNum12 alphaNum12, LiquidityPoolParameters liquidityPool)
-
-
Method Details
-
encode
- Specified by:
encodein interfaceXdrElement- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
builder
-
toBuilder
-
getDiscriminant
-
getAlphaNum4
-
getAlphaNum12
-
getLiquidityPool
-
setDiscriminant
-
setAlphaNum4
-
setAlphaNum12
-
setLiquidityPool
-
equals
-
hashCode
public int hashCode() -
toString
-