Package org.symbol.sdk.symbol.models
Class Block
java.lang.Object
org.symbol.sdk.CatbufferType
org.symbol.sdk.symbol.models.Block
- All Implemented Interfaces:
Serializer
- Direct Known Subclasses:
ImportanceBlockV1,NemesisBlockV1,NormalBlockV1
public sealed class Block
extends CatbufferType
permits ImportanceBlockV1, NemesisBlockV1, NormalBlockV1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Addressprotected Difficultyprotected final longprotected BlockFeeMultiplierprotected VrfProofprotected Heightprotected NetworkTypeprotected Hash256protected Hash256protected Signatureprotected PublicKeyprotected Hash256protected Timestampprotected Hash256protected BlockTypeprotected final longprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the beneficiaryAddress field.Gets the difficulty field.Gets the feeMultiplier field.Reads a named field.Gets the generationHashProof field.Gets the height field.Gets the network field.Gets the previousBlockHash field.Gets the receiptsHash field.Gets the signature field.Gets the signerPublicKey field.Gets the stateHash field.Gets the timestamp field.Gets the transactionsHash field.getType()Gets the type field.intGets the version field.protected voidserializeInto(Writer buffer) Writes this object's fields into the supplied buffer.voidsetBeneficiaryAddress(Address value) Sets the beneficiaryAddress field.voidsetDifficulty(Difficulty value) Sets the difficulty field.voidSets the feeMultiplier field.voidSets a named field.voidsetGenerationHashProof(VrfProof value) Sets the generationHashProof field.voidSets the height field.voidsetNetwork(NetworkType value) Sets the network field.voidsetPreviousBlockHash(Hash256 value) Sets the previousBlockHash field.voidsetReceiptsHash(Hash256 value) Sets the receiptsHash field.voidsetSignature(Signature value) Sets the signature field.voidsetSignerPublicKey(PublicKey value) Sets the signerPublicKey field.voidsetStateHash(Hash256 value) Sets the stateHash field.voidsetTimestamp(Timestamp value) Sets the timestamp field.voidsetTransactionsHash(Hash256 value) Sets the transactionsHash field.voidSets the type field.voidsetVersion(int value) Sets the version 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.CatbufferType
asByteArray, asBytes, asInt, asList, asLong, serialize, toJsonString
-
Field Details
-
signature
-
signerPublicKey
-
version
protected int version -
network
-
type
-
height
-
timestamp
-
difficulty
-
generationHashProof
-
previousBlockHash
-
transactionsHash
-
receiptsHash
-
stateHash
-
beneficiaryAddress
-
feeMultiplier
-
verifiableEntityHeaderReserved_1
protected final long verifiableEntityHeaderReserved_1- See Also:
-
entityBodyReserved_1
protected final long entityBodyReserved_1- See Also:
-
TYPE_HINTS
-
-
Constructor Details
-
Block
public Block()Creates a new Block.
-
-
Method Details
-
typeHints
- Block.typeHints
- Returns the type-hint map driving the rule-based descriptor pipeline.
- Overrides:
typeHintsin classCatbufferType- Returns:
- Field-name → rule-key map.
-
setField
- Block.setField
- Sets a named field. Used by the rule-based descriptor pipeline.
- Overrides:
setFieldin classCatbufferType- Parameters:
name- Field name (descriptor key).value- Value to assign.
-
getField
- Block.getField
- Reads a named field. Used by the facade-level entity inspection helpers.
- Overrides:
getFieldin classCatbufferType- Parameters:
name- Field name.- Returns:
- Field value.
-
sort
public void sort()- Block.sort
- Sorts the collections of this object so that it can be serialized canonically.
- Overrides:
sortin classCatbufferType
-
getSignature
- Block.getSignature
- Gets the signature field.
- Returns:
- The signature field.
-
setSignature
- Block.setSignature
- Sets the signature field.
- Parameters:
value- New signature value.
-
getSignerPublicKey
- Block.getSignerPublicKey
- Gets the signerPublicKey field.
- Returns:
- The signerPublicKey field.
-
setSignerPublicKey
- Block.setSignerPublicKey
- Sets the signerPublicKey field.
- Parameters:
value- New signerPublicKey value.
-
getVersion
public int getVersion()- Block.getVersion
- Gets the version field.
- Returns:
- The version field.
-
setVersion
public void setVersion(int value) - Block.setVersion
- Sets the version field.
- Parameters:
value- New version value.
-
getNetwork
- Block.getNetwork
- Gets the network field.
- Returns:
- The network field.
-
setNetwork
- Block.setNetwork
- Sets the network field.
- Parameters:
value- New network value.
-
getType
- Block.getType
- Gets the type field.
- Returns:
- The type field.
-
setType
- Block.setType
- Sets the type field.
- Parameters:
value- New type value.
-
getHeight
- Block.getHeight
- Gets the height field.
- Returns:
- The height field.
-
setHeight
- Block.setHeight
- Sets the height field.
- Parameters:
value- New height value.
-
getTimestamp
- Block.getTimestamp
- Gets the timestamp field.
- Returns:
- The timestamp field.
-
setTimestamp
- Block.setTimestamp
- Sets the timestamp field.
- Parameters:
value- New timestamp value.
-
getDifficulty
- Block.getDifficulty
- Gets the difficulty field.
- Returns:
- The difficulty field.
-
setDifficulty
- Block.setDifficulty
- Sets the difficulty field.
- Parameters:
value- New difficulty value.
-
getGenerationHashProof
- Block.getGenerationHashProof
- Gets the generationHashProof field.
- Returns:
- The generationHashProof field.
-
setGenerationHashProof
- Block.setGenerationHashProof
- Sets the generationHashProof field.
- Parameters:
value- New generationHashProof value.
-
getPreviousBlockHash
- Block.getPreviousBlockHash
- Gets the previousBlockHash field.
- Returns:
- The previousBlockHash field.
-
setPreviousBlockHash
- Block.setPreviousBlockHash
- Sets the previousBlockHash field.
- Parameters:
value- New previousBlockHash value.
-
getTransactionsHash
- Block.getTransactionsHash
- Gets the transactionsHash field.
- Returns:
- The transactionsHash field.
-
setTransactionsHash
- Block.setTransactionsHash
- Sets the transactionsHash field.
- Parameters:
value- New transactionsHash value.
-
getReceiptsHash
- Block.getReceiptsHash
- Gets the receiptsHash field.
- Returns:
- The receiptsHash field.
-
setReceiptsHash
- Block.setReceiptsHash
- Sets the receiptsHash field.
- Parameters:
value- New receiptsHash value.
-
getStateHash
- Block.getStateHash
- Gets the stateHash field.
- Returns:
- The stateHash field.
-
setStateHash
- Block.setStateHash
- Sets the stateHash field.
- Parameters:
value- New stateHash value.
-
getBeneficiaryAddress
- Block.getBeneficiaryAddress
- Gets the beneficiaryAddress field.
- Returns:
- The beneficiaryAddress field.
-
setBeneficiaryAddress
- Block.setBeneficiaryAddress
- Sets the beneficiaryAddress field.
- Parameters:
value- New beneficiaryAddress value.
-
getFeeMultiplier
- Block.getFeeMultiplier
- Gets the feeMultiplier field.
- Returns:
- The feeMultiplier field.
-
setFeeMultiplier
- Block.setFeeMultiplier
- Sets the feeMultiplier field.
- Parameters:
value- New feeMultiplier value.
-
size
public int size()- Block.size
- Calculates the size of the object.
- Returns:
- Size of this object in bytes.
-
serializeInto
- Block.serializeInto
- Writes this object's fields into the supplied buffer.
- Specified by:
serializeIntoin classCatbufferType- Parameters:
buffer- Output writer.
-
toString
- Block.toString
- Returns a string representation of this object.
-
toJson
- Block.toJson
- Converts this object to a JSON-serializable representation.
- Specified by:
toJsonin classCatbufferType- Returns:
- JSON-serializable representation of this object.
-