Package org.stellar.sdk.xdr
Class ContractIDPreimage
java.lang.Object
org.stellar.sdk.xdr.ContractIDPreimage
- All Implemented Interfaces:
XdrElement
ContractIDPreimage's original definition in the XDR file is:
union ContractIDPreimage switch (ContractIDPreimageType type)
{
case CONTRACT_ID_PREIMAGE_FROM_ADDRESS:
struct
{
SCAddress address;
uint256 salt;
} fromAddress;
case CONTRACT_ID_PREIMAGE_FROM_ASSET:
Asset fromAsset;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classContractIDPreimageFromAddress's original definition in the XDR file is: -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionContractIDPreimage(ContractIDPreimageType discriminant, ContractIDPreimage.ContractIDPreimageFromAddress fromAddress, Asset fromAsset) Creates a newContractIDPreimageinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ContractIDPreimagedecode(XdrDataInputStream stream) static ContractIDPreimagedecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ContractIDPreimagestatic ContractIDPreimagefromXdrBase64(String xdr) static ContractIDPreimagefromXdrByteArray(byte[] xdr) Value of thediscriminantfield.Value of thefromAddressfield.Value of thefromAssetfield.inthashCode()voidsetDiscriminant(ContractIDPreimageType discriminant) Value of thediscriminantfield.voidValue of thefromAddressfield.voidsetFromAsset(Asset fromAsset) Value of thefromAssetfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
ContractIDPreimage
public ContractIDPreimage() -
ContractIDPreimage
public ContractIDPreimage(ContractIDPreimageType discriminant, ContractIDPreimage.ContractIDPreimageFromAddress fromAddress, Asset fromAsset) Creates a newContractIDPreimageinstance.- Parameters:
discriminant- thediscriminantfield valuefromAddress- thefromAddressfield valuefromAsset- thefromAssetfield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getDiscriminant
Value of thediscriminantfield.- Returns:
- the
discriminantfield value
-
getFromAddress
Value of thefromAddressfield.- Returns:
- the
fromAddressfield value
-
getFromAsset
Value of thefromAssetfield.- Returns:
- the
fromAssetfield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setFromAddress
Value of thefromAddressfield.- Parameters:
fromAddress- thefromAddressfield value
-
setFromAsset
Value of thefromAssetfield.- Parameters:
fromAsset- thefromAssetfield value
-
equals
-
hashCode
public int hashCode() -
toString
-