Package org.stellar.sdk.xdr
Class PathPaymentStrictReceiveOp
java.lang.Object
org.stellar.sdk.xdr.PathPaymentStrictReceiveOp
- All Implemented Interfaces:
XdrElement
PathPaymentStrictReceiveOp's original definition in the XDR file is:
struct PathPaymentStrictReceiveOp
{
Asset sendAsset; // asset we pay with
int64 sendMax; // the maximum amount of sendAsset to
// send (excluding fees).
// The operation will fail if can't be met
MuxedAccount destination; // recipient of the payment
Asset destAsset; // what they end up with
int64 destAmount; // amount they end up with
Asset path<5>; // additional hops it must go through to get there
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionPathPaymentStrictReceiveOp(Asset sendAsset, Int64 sendMax, MuxedAccount destination, Asset destAsset, Int64 destAmount, Asset[] path) Creates a newPathPaymentStrictReceiveOpinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static PathPaymentStrictReceiveOpdecode(XdrDataInputStream stream) static PathPaymentStrictReceiveOpdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic PathPaymentStrictReceiveOpstatic PathPaymentStrictReceiveOpfromXdrBase64(String xdr) static PathPaymentStrictReceiveOpfromXdrByteArray(byte[] xdr) Value of thedestAmountfield.Value of thedestAssetfield.Value of thedestinationfield.Asset[]getPath()Value of thepathfield.Value of thesendAssetfield.Value of thesendMaxfield.inthashCode()voidsetDestAmount(Int64 destAmount) Value of thedestAmountfield.voidsetDestAsset(Asset destAsset) Value of thedestAssetfield.voidsetDestination(MuxedAccount destination) Value of thedestinationfield.voidValue of thepathfield.voidsetSendAsset(Asset sendAsset) Value of thesendAssetfield.voidsetSendMax(Int64 sendMax) Value of thesendMaxfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
PathPaymentStrictReceiveOp
public PathPaymentStrictReceiveOp() -
PathPaymentStrictReceiveOp
public PathPaymentStrictReceiveOp(Asset sendAsset, Int64 sendMax, MuxedAccount destination, Asset destAsset, Int64 destAmount, Asset[] path) Creates a newPathPaymentStrictReceiveOpinstance.- Parameters:
sendAsset- thesendAssetfield valuesendMax- thesendMaxfield valuedestination- thedestinationfield valuedestAsset- thedestAssetfield valuedestAmount- thedestAmountfield valuepath- thepathfield 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
public static PathPaymentStrictReceiveOp decode(XdrDataInputStream stream, int maxDepth) throws IOException - 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
-
getSendAsset
Value of thesendAssetfield.- Returns:
- the
sendAssetfield value
-
getSendMax
Value of thesendMaxfield.- Returns:
- the
sendMaxfield value
-
getDestination
Value of thedestinationfield.- Returns:
- the
destinationfield value
-
getDestAsset
Value of thedestAssetfield.- Returns:
- the
destAssetfield value
-
getDestAmount
Value of thedestAmountfield.- Returns:
- the
destAmountfield value
-
getPath
Value of thepathfield.- Returns:
- the
pathfield value
-
setSendAsset
Value of thesendAssetfield.- Parameters:
sendAsset- thesendAssetfield value
-
setSendMax
Value of thesendMaxfield.- Parameters:
sendMax- thesendMaxfield value
-
setDestination
Value of thedestinationfield.- Parameters:
destination- thedestinationfield value
-
setDestAsset
Value of thedestAssetfield.- Parameters:
destAsset- thedestAssetfield value
-
setDestAmount
Value of thedestAmountfield.- Parameters:
destAmount- thedestAmountfield value
-
setPath
Value of thepathfield.- Parameters:
path- thepathfield value
-
equals
-
hashCode
public int hashCode() -
toString
-