java.lang.Object
java.lang.Record
software.sava.rpc.json.http.response.Block
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockHashrecord component.longReturns the value of theblockHeightrecord component.longReturns the value of theblockTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theparentSlotrecord component.static Blockparse(systems.comodal.jsoniter.JsonIterator ji) Returns the value of thepreviousBlockHashrecord component.rewards()Returns the value of therewardsrecord component.Returns the value of thesignaturesrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransactionsrecord component.
-
Constructor Details
-
Block
public Block(long blockHeight, long blockTime, String blockHash, String previousBlockHash, long parentSlot, List<TxReward> rewards, List<String> signatures, List<BlockTx> transactions) Creates an instance of aBlockrecord class.- Parameters:
blockHeight- the value for theblockHeightrecord componentblockTime- the value for theblockTimerecord componentblockHash- the value for theblockHashrecord componentpreviousBlockHash- the value for thepreviousBlockHashrecord componentparentSlot- the value for theparentSlotrecord componentrewards- the value for therewardsrecord componentsignatures- the value for thesignaturesrecord componenttransactions- the value for thetransactionsrecord component
-
-
Method Details
-
parse
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
blockHeight
public long blockHeight()Returns the value of theblockHeightrecord component.- Returns:
- the value of the
blockHeightrecord component
-
blockTime
public long blockTime()Returns the value of theblockTimerecord component.- Returns:
- the value of the
blockTimerecord component
-
blockHash
Returns the value of theblockHashrecord component.- Returns:
- the value of the
blockHashrecord component
-
previousBlockHash
Returns the value of thepreviousBlockHashrecord component.- Returns:
- the value of the
previousBlockHashrecord component
-
parentSlot
public long parentSlot()Returns the value of theparentSlotrecord component.- Returns:
- the value of the
parentSlotrecord component
-
rewards
Returns the value of therewardsrecord component.- Returns:
- the value of the
rewardsrecord component
-
signatures
Returns the value of thesignaturesrecord component.- Returns:
- the value of the
signaturesrecord component
-
transactions
Returns the value of thetransactionsrecord component.- Returns:
- the value of the
transactionsrecord component
-