java.lang.Object
java.lang.Record
net.lageto.monero.rpc.model.Block
public record Block(BlockHeader header, String coinbaseHash, List<String> transactionHashes)
extends Record
Represents a block in the blockchain.
-
Constructor Summary
ConstructorDescriptionBlock(BlockHeader header, String coinbaseHash, List<String> transactionHashes)
Creates an instance of aBlock
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecoinbaseHash
record component.boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.header()
Returns the value of theheader
record component.toString()
Returns a string representation of this record class.Returns the value of thetransactionHashes
record component.
-
Constructor Details
-
Block
Creates an instance of aBlock
record class.- Parameters:
header
- the value for theheader
record componentcoinbaseHash
- the value for thecoinbaseHash
record componenttransactionHashes
- the value for thetransactionHashes
record component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
header
Returns the value of theheader
record component.- Returns:
- the value of the
header
record component
-
coinbaseHash
Returns the value of thecoinbaseHash
record component.- Returns:
- the value of the
coinbaseHash
record component
-
transactionHashes
Returns the value of thetransactionHashes
record component.- Returns:
- the value of the
transactionHashes
record component
-