Package org.symbol.sdk.symbol.models
Class NormalBlockV1
java.lang.Object
org.symbol.sdk.CatbufferType
org.symbol.sdk.symbol.models.Block
org.symbol.sdk.symbol.models.NormalBlockV1
- 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 NormalBlockV1deserialize(ByteBuffer buffer) Deserializes an instance of this object from a byte payload.Reads a named field.Gets the transactions field.protected voidserializeInto(Writer buffer) Writes this object's fields into the supplied buffer.voidSets a named field.voidsetTransactions(List<Transaction> value) Sets the transactions 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
-
NormalBlockV1
public NormalBlockV1()Creates a new NormalBlockV1.
-
-
Method Details
-
typeHints
- NormalBlockV1.typeHints
- Returns the type-hint map driving the rule-based descriptor pipeline.
-
setField
- NormalBlockV1.setField
- Sets a named field. Used by the rule-based descriptor pipeline.
-
getField
- NormalBlockV1.getField
- Reads a named field. Used by the facade-level entity inspection helpers.
-
sort
public void sort()- NormalBlockV1.sort
- Sorts the collections of this object so that it can be serialized canonically.
-
getTransactions
- NormalBlockV1.getTransactions
- Gets the transactions field.
- Returns:
- The transactions field.
-
setTransactions
- NormalBlockV1.setTransactions
- Sets the transactions field.
- Parameters:
value- New transactions value.
-
size
public int size()- NormalBlockV1.size
- Calculates the size of the object.
- Specified by:
sizein interfaceSerializer- Overrides:
sizein classBlock- Returns:
- Size of this object in bytes.
-
deserialize
- NormalBlockV1.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
- NormalBlockV1.serializeInto
- Writes this object's fields into the supplied buffer.
- Overrides:
serializeIntoin classBlock- Parameters:
buffer- Output writer.
-
toString
- NormalBlockV1.toString
- Returns a string representation of this object.
-
toJson
- NormalBlockV1.toJson
- Converts this object to a JSON-serializable representation.
-