Package org.stellar.sdk.xdr
Class CreatePassiveSellOfferOp
java.lang.Object
org.stellar.sdk.xdr.CreatePassiveSellOfferOp
- All Implemented Interfaces:
XdrElement
CreatePassiveSellOfferOp's original definition in the XDR file is:
struct CreatePassiveSellOfferOp
{
Asset selling; // A
Asset buying; // B
int64 amount; // amount taker gets
Price price; // cost of A in terms of B
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionCreatePassiveSellOfferOp(Asset selling, Asset buying, Int64 amount, Price price) Creates a newCreatePassiveSellOfferOpinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static CreatePassiveSellOfferOpdecode(XdrDataInputStream stream) static CreatePassiveSellOfferOpdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic CreatePassiveSellOfferOpstatic CreatePassiveSellOfferOpfromXdrBase64(String xdr) static CreatePassiveSellOfferOpfromXdrByteArray(byte[] xdr) Value of theamountfield.Value of thebuyingfield.getPrice()Value of thepricefield.Value of thesellingfield.inthashCode()voidValue of theamountfield.voidValue of thebuyingfield.voidValue of thepricefield.voidsetSelling(Asset selling) Value of thesellingfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
CreatePassiveSellOfferOp
public CreatePassiveSellOfferOp() -
CreatePassiveSellOfferOp
Creates a newCreatePassiveSellOfferOpinstance.- Parameters:
selling- thesellingfield valuebuying- thebuyingfield valueamount- theamountfield valueprice- thepricefield 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 CreatePassiveSellOfferOp 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
-
getSelling
Value of thesellingfield.- Returns:
- the
sellingfield value
-
getBuying
Value of thebuyingfield.- Returns:
- the
buyingfield value
-
getAmount
Value of theamountfield.- Returns:
- the
amountfield value
-
getPrice
Value of thepricefield.- Returns:
- the
pricefield value
-
setSelling
Value of thesellingfield.- Parameters:
selling- thesellingfield value
-
setBuying
Value of thebuyingfield.- Parameters:
buying- thebuyingfield value
-
setAmount
Value of theamountfield.- Parameters:
amount- theamountfield value
-
setPrice
Value of thepricefield.- Parameters:
price- thepricefield value
-
equals
-
hashCode
public int hashCode() -
toString
-