Package org.stellar.sdk.xdr
Class SCPBallot
java.lang.Object
org.stellar.sdk.xdr.SCPBallot
- All Implemented Interfaces:
XdrElement
SCPBallot's original definition in the XDR file is:
struct SCPBallot
{
uint32 counter; // n
Value value; // x
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SCPBallot.SCPBallotBuilderbuilder()static SCPBallotdecode(XdrDataInputStream stream) static SCPBallotdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SCPBallotstatic SCPBallotfromXdrBase64(String xdr) static SCPBallotfromXdrByteArray(byte[] xdr) Value of thecounterfield.getValue()Value of thevaluefield.inthashCode()voidsetCounter(Uint32 counter) Value of thecounterfield.voidValue of thevaluefield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SCPBallot
public SCPBallot() -
SCPBallot
Creates a newSCPBallotinstance.- Parameters:
counter- thecounterfield valuevalue- thevaluefield 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
-
getCounter
Value of thecounterfield.- Returns:
- the
counterfield value
-
getValue
Value of thevaluefield.- Returns:
- the
valuefield value
-
setCounter
Value of thecounterfield.- Parameters:
counter- thecounterfield value
-
setValue
Value of thevaluefield.- Parameters:
value- thevaluefield value
-
equals
-
hashCode
public int hashCode() -
toString
-