Package org.stellar.sdk.xdr
Class SCPStatement.SCPStatementPledges.SCPStatementPrepare
java.lang.Object
org.stellar.sdk.xdr.SCPStatement.SCPStatementPledges.SCPStatementPrepare
- All Implemented Interfaces:
XdrElement
- Enclosing class:
SCPStatement.SCPStatementPledges
public static class SCPStatement.SCPStatementPledges.SCPStatementPrepare
extends Object
implements XdrElement
SCPStatementPrepare's original definition in the XDR file is:
struct
{
Hash quorumSetHash; // D
SCPBallot ballot; // b
SCPBallot* prepared; // p
SCPBallot* preparedPrime; // p'
uint32 nC; // c.n
uint32 nH; // h.n
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()decode(XdrDataInputStream stream) decode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanfromXdrBase64(String xdr) fromXdrByteArray(byte[] xdr) Value of theballotfield.getNC()Value of thenCfield.getNH()Value of thenHfield.Value of thepreparedfield.Value of thepreparedPrimefield.Value of thequorumSetHashfield.inthashCode()voidValue of theballotfield.voidValue of thenCfield.voidValue of thenHfield.voidsetPrepared(SCPBallot prepared) Value of thepreparedfield.voidsetPreparedPrime(SCPBallot preparedPrime) Value of thepreparedPrimefield.voidsetQuorumSetHash(Hash quorumSetHash) Value of thequorumSetHashfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SCPStatementPrepare
public SCPStatementPrepare() -
SCPStatementPrepare
public SCPStatementPrepare(Hash quorumSetHash, SCPBallot ballot, SCPBallot prepared, SCPBallot preparedPrime, Uint32 nC, Uint32 nH) Creates a newSCPStatementPrepareinstance.- Parameters:
quorumSetHash- thequorumSetHashfield valueballot- theballotfield valueprepared- thepreparedfield valuepreparedPrime- thepreparedPrimefield valuenC- thenCfield valuenH- thenHfield 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 SCPStatement.SCPStatementPledges.SCPStatementPrepare decode(XdrDataInputStream stream, int maxDepth) throws IOException - Throws:
IOException
-
decode
public static SCPStatement.SCPStatementPledges.SCPStatementPrepare decode(XdrDataInputStream stream) throws IOException - Throws:
IOException
-
fromXdrBase64
public static SCPStatement.SCPStatementPledges.SCPStatementPrepare fromXdrBase64(String xdr) throws IOException - Throws:
IOException
-
fromXdrByteArray
public static SCPStatement.SCPStatementPledges.SCPStatementPrepare fromXdrByteArray(byte[] xdr) throws IOException - 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
public static SCPStatement.SCPStatementPledges.SCPStatementPrepare.SCPStatementPrepareBuilder builder() -
toBuilder
-
getQuorumSetHash
Value of thequorumSetHashfield.- Returns:
- the
quorumSetHashfield value
-
getBallot
Value of theballotfield.- Returns:
- the
ballotfield value
-
getPrepared
Value of thepreparedfield.- Returns:
- the
preparedfield value
-
getPreparedPrime
Value of thepreparedPrimefield.- Returns:
- the
preparedPrimefield value
-
getNC
Value of thenCfield.- Returns:
- the
nCfield value
-
getNH
Value of thenHfield.- Returns:
- the
nHfield value
-
setQuorumSetHash
Value of thequorumSetHashfield.- Parameters:
quorumSetHash- thequorumSetHashfield value
-
setBallot
Value of theballotfield.- Parameters:
ballot- theballotfield value
-
setPrepared
Value of thepreparedfield.- Parameters:
prepared- thepreparedfield value
-
setPreparedPrime
Value of thepreparedPrimefield.- Parameters:
preparedPrime- thepreparedPrimefield value
-
setNC
Value of thenCfield.- Parameters:
nC- thenCfield value
-
setNH
Value of thenHfield.- Parameters:
nH- thenHfield value
-
equals
-
hashCode
public int hashCode() -
toString
-