Package org.stellar.sdk.xdr
Class ManageBuyOfferOp
java.lang.Object
org.stellar.sdk.xdr.ManageBuyOfferOp
- All Implemented Interfaces:
XdrElement
ManageBuyOfferOp's original definition in the XDR file is:
struct ManageBuyOfferOp
{
Asset selling;
Asset buying;
int64 buyAmount; // amount being bought. if set to 0, delete the offer
Price price; // price of thing being bought in terms of what you are
// selling
// 0=create a new offer, otherwise edit an existing offer
int64 offerID;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newManageBuyOfferOpinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ManageBuyOfferOpdecode(XdrDataInputStream stream) static ManageBuyOfferOpdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ManageBuyOfferOpstatic ManageBuyOfferOpfromXdrBase64(String xdr) static ManageBuyOfferOpfromXdrByteArray(byte[] xdr) Value of thebuyAmountfield.Value of thebuyingfield.Value of theofferIDfield.getPrice()Value of thepricefield.Value of thesellingfield.inthashCode()voidsetBuyAmount(Int64 buyAmount) Value of thebuyAmountfield.voidValue of thebuyingfield.voidsetOfferID(Int64 offerID) Value of theofferIDfield.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
-
ManageBuyOfferOp
public ManageBuyOfferOp() -
ManageBuyOfferOp
Creates a newManageBuyOfferOpinstance.- Parameters:
selling- thesellingfield valuebuying- thebuyingfield valuebuyAmount- thebuyAmountfield valueprice- thepricefield valueofferID- theofferIDfield 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
-
getSelling
Value of thesellingfield.- Returns:
- the
sellingfield value
-
getBuying
Value of thebuyingfield.- Returns:
- the
buyingfield value
-
getBuyAmount
Value of thebuyAmountfield.- Returns:
- the
buyAmountfield value
-
getPrice
Value of thepricefield.- Returns:
- the
pricefield value
-
getOfferID
Value of theofferIDfield.- Returns:
- the
offerIDfield value
-
setSelling
Value of thesellingfield.- Parameters:
selling- thesellingfield value
-
setBuying
Value of thebuyingfield.- Parameters:
buying- thebuyingfield value
-
setBuyAmount
Value of thebuyAmountfield.- Parameters:
buyAmount- thebuyAmountfield value
-
setPrice
Value of thepricefield.- Parameters:
price- thepricefield value
-
setOfferID
Value of theofferIDfield.- Parameters:
offerID- theofferIDfield value
-
equals
-
hashCode
public int hashCode() -
toString
-