public final class ChangeTrustAsset
extends java.lang.Object
ChangeTrustOperation| Constructor and Description |
|---|
ChangeTrustAsset(@NonNull Asset asset)
Creates a ChangeTrustAsset for a regular asset.
|
ChangeTrustAsset(@NonNull LiquidityPool liquidityPool)
Creates a ChangeTrustAsset for a liquidity pool share.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
static ChangeTrustAsset |
fromXdr(ChangeTrustAsset changeTrustAsset)
Creates a ChangeTrustAsset from its XDR representation.
|
Asset |
getAsset()
The asset for which the trustline is being changed.
|
@NonNull AssetType |
getAssetType()
The type of the asset.
|
LiquidityPool |
getLiquidityPool()
The liquidity pool for which the trustline is being changed.
|
int |
hashCode() |
java.lang.String |
toString() |
ChangeTrustAsset |
toXdr()
Converts this ChangeTrustAsset to its XDR representation.
|
public ChangeTrustAsset(@NonNull
@NonNull Asset asset)
asset - The asset for which the trust is being changed.public ChangeTrustAsset(@NonNull
@NonNull LiquidityPool liquidityPool)
liquidityPool - The liquidity pool for which the trust is being changed.public ChangeTrustAsset toXdr()
public static ChangeTrustAsset fromXdr(ChangeTrustAsset changeTrustAsset)
changeTrustAsset - The XDR representation of the ChangeTrustAsset.java.lang.IllegalArgumentException - if the asset type is unknown.@NonNull public @NonNull AssetType getAssetType()
@Nullable public Asset getAsset()
If assetType is one of AssetType.ASSET_TYPE_NATIVE, AssetType.ASSET_TYPE_CREDIT_ALPHANUM4 or AssetType.ASSET_TYPE_CREDIT_ALPHANUM12 then
this field will be set.
@Nullable public LiquidityPool getLiquidityPool()
If assetType is AssetType.ASSET_TYPE_POOL_SHARE then this field will be set.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object