Package org.symbol.sdk.symbol.models
Class ImportanceBlockV1
java.lang.Object
org.symbol.sdk.CatbufferType
org.symbol.sdk.symbol.models.Block
org.symbol.sdk.symbol.models.ImportanceBlockV1
- All Implemented Interfaces:
Serializer
-
Field Summary
FieldsFields inherited from class org.symbol.sdk.symbol.models.Block
beneficiaryAddress, difficulty, entityBodyReserved_1, feeMultiplier, generationHashProof, height, network, previousBlockHash, receiptsHash, signature, signerPublicKey, stateHash, timestamp, transactionsHash, type, verifiableEntityHeaderReserved_1, version -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImportanceBlockV1deserialize(ByteBuffer buffer) Deserializes an instance of this object from a byte payload.Reads a named field.longGets the harvestingEligibleAccountsCount field.Gets the previousImportanceBlockHash field.Gets the totalVotingBalance field.Gets the transactions field.longGets the votingEligibleAccountsCount field.protected voidserializeInto(Writer buffer) Writes this object's fields into the supplied buffer.voidSets a named field.voidsetHarvestingEligibleAccountsCount(long value) Sets the harvestingEligibleAccountsCount field.voidSets the previousImportanceBlockHash field.voidsetTotalVotingBalance(Amount value) Sets the totalVotingBalance field.voidsetTransactions(List<Transaction> value) Sets the transactions field.voidsetVotingEligibleAccountsCount(long value) Sets the votingEligibleAccountsCount field.intsize()Calculates the size of the object.voidsort()Sorts the collections of this object so that it can be serialized canonically.toJson()Converts this object to a JSON-serializable representation.toString()Returns a string representation of this object.Returns the type-hint map driving the rule-based descriptor pipeline.Methods inherited from class org.symbol.sdk.symbol.models.Block
getBeneficiaryAddress, getDifficulty, getFeeMultiplier, getGenerationHashProof, getHeight, getNetwork, getPreviousBlockHash, getReceiptsHash, getSignature, getSignerPublicKey, getStateHash, getTimestamp, getTransactionsHash, getType, getVersion, setBeneficiaryAddress, setDifficulty, setFeeMultiplier, setGenerationHashProof, setHeight, setNetwork, setPreviousBlockHash, setReceiptsHash, setSignature, setSignerPublicKey, setStateHash, setTimestamp, setTransactionsHash, setType, setVersionMethods inherited from class org.symbol.sdk.CatbufferType
asByteArray, asBytes, asInt, asList, asLong, serialize, toJsonString
-
Field Details
-
BLOCK_VERSION
public static final int BLOCK_VERSION- See Also:
-
BLOCK_TYPE
-
TYPE_HINTS
-
-
Constructor Details
-
ImportanceBlockV1
public ImportanceBlockV1()Creates a new ImportanceBlockV1.
-
-
Method Details
-
typeHints
- ImportanceBlockV1.typeHints
- Returns the type-hint map driving the rule-based descriptor pipeline.
-
setField
- ImportanceBlockV1.setField
- Sets a named field. Used by the rule-based descriptor pipeline.
-
getField
- ImportanceBlockV1.getField
- Reads a named field. Used by the facade-level entity inspection helpers.
-
sort
public void sort()- ImportanceBlockV1.sort
- Sorts the collections of this object so that it can be serialized canonically.
-
getVotingEligibleAccountsCount
public long getVotingEligibleAccountsCount()- ImportanceBlockV1.getVotingEligibleAccountsCount
- Gets the votingEligibleAccountsCount field.
- Returns:
- The votingEligibleAccountsCount field.
-
setVotingEligibleAccountsCount
public void setVotingEligibleAccountsCount(long value) - ImportanceBlockV1.setVotingEligibleAccountsCount
- Sets the votingEligibleAccountsCount field.
- Parameters:
value- New votingEligibleAccountsCount value.
-
getHarvestingEligibleAccountsCount
public long getHarvestingEligibleAccountsCount()- ImportanceBlockV1.getHarvestingEligibleAccountsCount
- Gets the harvestingEligibleAccountsCount field.
- Returns:
- The harvestingEligibleAccountsCount field.
-
setHarvestingEligibleAccountsCount
public void setHarvestingEligibleAccountsCount(long value) - ImportanceBlockV1.setHarvestingEligibleAccountsCount
- Sets the harvestingEligibleAccountsCount field.
- Parameters:
value- New harvestingEligibleAccountsCount value.
-
getTotalVotingBalance
- ImportanceBlockV1.getTotalVotingBalance
- Gets the totalVotingBalance field.
- Returns:
- The totalVotingBalance field.
-
setTotalVotingBalance
- ImportanceBlockV1.setTotalVotingBalance
- Sets the totalVotingBalance field.
- Parameters:
value- New totalVotingBalance value.
-
getPreviousImportanceBlockHash
- ImportanceBlockV1.getPreviousImportanceBlockHash
- Gets the previousImportanceBlockHash field.
- Returns:
- The previousImportanceBlockHash field.
-
setPreviousImportanceBlockHash
- ImportanceBlockV1.setPreviousImportanceBlockHash
- Sets the previousImportanceBlockHash field.
- Parameters:
value- New previousImportanceBlockHash value.
-
getTransactions
- ImportanceBlockV1.getTransactions
- Gets the transactions field.
- Returns:
- The transactions field.
-
setTransactions
- ImportanceBlockV1.setTransactions
- Sets the transactions field.
- Parameters:
value- New transactions value.
-
size
public int size()- ImportanceBlockV1.size
- Calculates the size of the object.
- Specified by:
sizein interfaceSerializer- Overrides:
sizein classBlock- Returns:
- Size of this object in bytes.
-
deserialize
- ImportanceBlockV1.deserialize
- Deserializes an instance of this object from a byte payload.
- Parameters:
buffer- Output writer.- Returns:
- Deserialized object.
- Throws:
IndexOutOfBoundsException- if the buffer is truncated or a declared length overruns itIllegalArgumentException- if a field carries an invalid value (e.g. a reserved field or unknown discriminator)
-
serializeInto
- ImportanceBlockV1.serializeInto
- Writes this object's fields into the supplied buffer.
- Overrides:
serializeIntoin classBlock- Parameters:
buffer- Output writer.
-
toString
- ImportanceBlockV1.toString
- Returns a string representation of this object.
-
toJson
- ImportanceBlockV1.toJson
- Converts this object to a JSON-serializable representation.
-