Package org.stellar.sdk.xdr
Class SCPStatement.SCPStatementPledges.SCPStatementConfirm
java.lang.Object
org.stellar.sdk.xdr.SCPStatement.SCPStatementPledges.SCPStatementConfirm
- All Implemented Interfaces:
XdrElement
- Enclosing class:
SCPStatement.SCPStatementPledges
public static class SCPStatement.SCPStatementPledges.SCPStatementConfirm
extends Object
implements XdrElement
SCPStatementConfirm's original definition in the XDR file is:
struct
{
SCPBallot ballot; // b
uint32 nPrepared; // p.n
uint32 nCommit; // c.n
uint32 nH; // h.n
Hash quorumSetHash; // D
}
-
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.Value of thenCommitfield.getNH()Value of thenHfield.Value of thenPreparedfield.Value of thequorumSetHashfield.inthashCode()voidValue of theballotfield.voidsetNCommit(Uint32 nCommit) Value of thenCommitfield.voidValue of thenHfield.voidsetNPrepared(Uint32 nPrepared) Value of thenPreparedfield.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
-
SCPStatementConfirm
public SCPStatementConfirm() -
SCPStatementConfirm
public SCPStatementConfirm(SCPBallot ballot, Uint32 nPrepared, Uint32 nCommit, Uint32 nH, Hash quorumSetHash) Creates a newSCPStatementConfirminstance.- Parameters:
ballot- theballotfield valuenPrepared- thenPreparedfield valuenCommit- thenCommitfield valuenH- thenHfield valuequorumSetHash- thequorumSetHashfield 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.SCPStatementConfirm decode(XdrDataInputStream stream, int maxDepth) throws IOException - Throws:
IOException
-
decode
public static SCPStatement.SCPStatementPledges.SCPStatementConfirm decode(XdrDataInputStream stream) throws IOException - Throws:
IOException
-
fromXdrBase64
public static SCPStatement.SCPStatementPledges.SCPStatementConfirm fromXdrBase64(String xdr) throws IOException - Throws:
IOException
-
fromXdrByteArray
public static SCPStatement.SCPStatementPledges.SCPStatementConfirm 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.SCPStatementConfirm.SCPStatementConfirmBuilder builder() -
toBuilder
-
getBallot
Value of theballotfield.- Returns:
- the
ballotfield value
-
getNPrepared
Value of thenPreparedfield.- Returns:
- the
nPreparedfield value
-
getNCommit
Value of thenCommitfield.- Returns:
- the
nCommitfield value
-
getNH
Value of thenHfield.- Returns:
- the
nHfield value
-
getQuorumSetHash
Value of thequorumSetHashfield.- Returns:
- the
quorumSetHashfield value
-
setBallot
Value of theballotfield.- Parameters:
ballot- theballotfield value
-
setNPrepared
Value of thenPreparedfield.- Parameters:
nPrepared- thenPreparedfield value
-
setNCommit
Value of thenCommitfield.- Parameters:
nCommit- thenCommitfield value
-
setNH
Value of thenHfield.- Parameters:
nH- thenHfield value
-
setQuorumSetHash
Value of thequorumSetHashfield.- Parameters:
quorumSetHash- thequorumSetHashfield value
-
equals
-
hashCode
public int hashCode() -
toString
-