Package org.stellar.sdk.xdr
Class SCPNomination
java.lang.Object
org.stellar.sdk.xdr.SCPNomination
- All Implemented Interfaces:
XdrElement
SCPNomination's original definition in the XDR file is:
struct SCPNomination
{
Hash quorumSetHash; // D
Value votes<>; // X
Value accepted<>; // Y
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSCPNomination(Hash quorumSetHash, Value[] votes, Value[] accepted) Creates a newSCPNominationinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SCPNominationdecode(XdrDataInputStream stream) static SCPNominationdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SCPNominationstatic SCPNominationfromXdrBase64(String xdr) static SCPNominationfromXdrByteArray(byte[] xdr) Value[]Value of theacceptedfield.Value of thequorumSetHashfield.Value[]getVotes()Value of thevotesfield.inthashCode()voidsetAccepted(Value[] accepted) Value of theacceptedfield.voidsetQuorumSetHash(Hash quorumSetHash) Value of thequorumSetHashfield.voidValue of thevotesfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SCPNomination
public SCPNomination() -
SCPNomination
Creates a newSCPNominationinstance.- Parameters:
quorumSetHash- thequorumSetHashfield valuevotes- thevotesfield valueaccepted- theacceptedfield 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
-
getQuorumSetHash
Value of thequorumSetHashfield.- Returns:
- the
quorumSetHashfield value
-
getVotes
Value of thevotesfield.- Returns:
- the
votesfield value
-
getAccepted
Value of theacceptedfield.- Returns:
- the
acceptedfield value
-
setQuorumSetHash
Value of thequorumSetHashfield.- Parameters:
quorumSetHash- thequorumSetHashfield value
-
setVotes
Value of thevotesfield.- Parameters:
votes- thevotesfield value
-
setAccepted
Value of theacceptedfield.- Parameters:
accepted- theacceptedfield value
-
equals
-
hashCode
public int hashCode() -
toString
-