Package org.stellar.sdk.xdr
Class ContractCostParamEntry
java.lang.Object
org.stellar.sdk.xdr.ContractCostParamEntry
- All Implemented Interfaces:
XdrElement
ContractCostParamEntry's original definition in the XDR file is:
struct ContractCostParamEntry {
// use `ext` to add more terms (e.g. higher order polynomials) in the future
ExtensionPoint ext;
int64 constTerm;
int64 linearTerm;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionContractCostParamEntry(ExtensionPoint ext, Int64 constTerm, Int64 linearTerm) Creates a newContractCostParamEntryinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ContractCostParamEntrydecode(XdrDataInputStream stream) static ContractCostParamEntrydecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ContractCostParamEntrystatic ContractCostParamEntryfromXdrBase64(String xdr) static ContractCostParamEntryfromXdrByteArray(byte[] xdr) Value of theconstTermfield.getExt()Value of theextfield.Value of thelinearTermfield.inthashCode()voidsetConstTerm(Int64 constTerm) Value of theconstTermfield.voidsetExt(ExtensionPoint ext) Value of theextfield.voidsetLinearTerm(Int64 linearTerm) Value of thelinearTermfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
ContractCostParamEntry
public ContractCostParamEntry() -
ContractCostParamEntry
Creates a newContractCostParamEntryinstance.- Parameters:
ext- theextfield valueconstTerm- theconstTermfield valuelinearTerm- thelinearTermfield 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 ContractCostParamEntry 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
-
getExt
Value of theextfield.- Returns:
- the
extfield value
-
getConstTerm
Value of theconstTermfield.- Returns:
- the
constTermfield value
-
getLinearTerm
Value of thelinearTermfield.- Returns:
- the
linearTermfield value
-
setExt
Value of theextfield.- Parameters:
ext- theextfield value
-
setConstTerm
Value of theconstTermfield.- Parameters:
constTerm- theconstTermfield value
-
setLinearTerm
Value of thelinearTermfield.- Parameters:
linearTerm- thelinearTermfield value
-
equals
-
hashCode
public int hashCode() -
toString
-