Package org.stellar.sdk.xdr
Class SCPQuorumSet
java.lang.Object
org.stellar.sdk.xdr.SCPQuorumSet
- All Implemented Interfaces:
XdrElement
SCPQuorumSet's original definition in the XDR file is:
struct SCPQuorumSet
{
uint32 threshold;
NodeID validators<>;
SCPQuorumSet innerSets<>;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSCPQuorumSet(Uint32 threshold, NodeID[] validators, SCPQuorumSet[] innerSets) Creates a newSCPQuorumSetinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SCPQuorumSetdecode(XdrDataInputStream stream) static SCPQuorumSetdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SCPQuorumSetstatic SCPQuorumSetfromXdrBase64(String xdr) static SCPQuorumSetfromXdrByteArray(byte[] xdr) Value of theinnerSetsfield.Value of thethresholdfield.NodeID[]Value of thevalidatorsfield.inthashCode()voidsetInnerSets(SCPQuorumSet[] innerSets) Value of theinnerSetsfield.voidsetThreshold(Uint32 threshold) Value of thethresholdfield.voidsetValidators(NodeID[] validators) Value of thevalidatorsfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SCPQuorumSet
public SCPQuorumSet() -
SCPQuorumSet
Creates a newSCPQuorumSetinstance.- Parameters:
threshold- thethresholdfield valuevalidators- thevalidatorsfield valueinnerSets- theinnerSetsfield 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
-
getThreshold
Value of thethresholdfield.- Returns:
- the
thresholdfield value
-
getValidators
Value of thevalidatorsfield.- Returns:
- the
validatorsfield value
-
getInnerSets
Value of theinnerSetsfield.- Returns:
- the
innerSetsfield value
-
setThreshold
Value of thethresholdfield.- Parameters:
threshold- thethresholdfield value
-
setValidators
Value of thevalidatorsfield.- Parameters:
validators- thevalidatorsfield value
-
setInnerSets
Value of theinnerSetsfield.- Parameters:
innerSets- theinnerSetsfield value
-
equals
-
hashCode
public int hashCode() -
toString
-