Package org.stellar.sdk.xdr
Class ManageSellOfferOp
java.lang.Object
org.stellar.sdk.xdr.ManageSellOfferOp
- All Implemented Interfaces:
XdrElement
ManageSellOfferOp's original definition in the XDR file is:
struct ManageSellOfferOp
{
Asset selling;
Asset buying;
int64 amount; // amount being sold. if set to 0, delete the offer
Price price; // price of thing being sold in terms of what you are buying
// 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 newManageSellOfferOpinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ManageSellOfferOpdecode(XdrDataInputStream stream) static ManageSellOfferOpdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ManageSellOfferOpstatic ManageSellOfferOpfromXdrBase64(String xdr) static ManageSellOfferOpfromXdrByteArray(byte[] xdr) Value of theamountfield.Value of thebuyingfield.Value of theofferIDfield.getPrice()Value of thepricefield.Value of thesellingfield.inthashCode()voidValue of theamountfield.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
-
ManageSellOfferOp
public ManageSellOfferOp() -
ManageSellOfferOp
Creates a newManageSellOfferOpinstance.- Parameters:
selling- thesellingfield valuebuying- thebuyingfield valueamount- theamountfield 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
-
getAmount
Value of theamountfield.- Returns:
- the
amountfield 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
-
setAmount
Value of theamountfield.- Parameters:
amount- theamountfield value
-
setPrice
Value of thepricefield.- Parameters:
price- thepricefield value
-
setOfferID
Value of theofferIDfield.- Parameters:
offerID- theofferIDfield value
-
equals
-
hashCode
public int hashCode() -
toString
-