java.lang.Object
java.lang.Record
net.lageto.monero.rpc.model.BlockHeader
-
Constructor Summary
ConstructorDescriptionBlockHeader(int blockSize, long depth, long difficulty, String hash, long height, int majorVersion, int minorVersion, long nonce, boolean orphanStatus, String prevHash, long reward, long timestamp)
Creates an instance of aBlockHeader
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of theblockSize
record component.long
depth()
Returns the value of thedepth
record component.long
Returns the value of thedifficulty
record component.boolean
Indicates whether some other object is "equal to" this one.hash()
Returns the value of thehash
record component.int
hashCode()
Returns a hash code value for this object.long
height()
Returns the value of theheight
record component.int
Returns the value of themajorVersion
record component.int
Returns the value of theminorVersion
record component.long
nonce()
Returns the value of thenonce
record component.boolean
Returns the value of theorphanStatus
record component.prevHash()
Returns the value of theprevHash
record component.long
reward()
Returns the value of thereward
record component.long
Returns the value of thetimestamp
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
BlockHeader
public BlockHeader(int blockSize, long depth, long difficulty, String hash, long height, int majorVersion, int minorVersion, long nonce, boolean orphanStatus, String prevHash, long reward, long timestamp)Creates an instance of aBlockHeader
record class.- Parameters:
blockSize
- the value for theblockSize
record componentdepth
- the value for thedepth
record componentdifficulty
- the value for thedifficulty
record componenthash
- the value for thehash
record componentheight
- the value for theheight
record componentmajorVersion
- the value for themajorVersion
record componentminorVersion
- the value for theminorVersion
record componentnonce
- the value for thenonce
record componentorphanStatus
- the value for theorphanStatus
record componentprevHash
- the value for theprevHash
record componentreward
- the value for thereward
record componenttimestamp
- the value for thetimestamp
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
blockSize
public int blockSize()Returns the value of theblockSize
record component.- Returns:
- the value of the
blockSize
record component
-
depth
public long depth()Returns the value of thedepth
record component.- Returns:
- the value of the
depth
record component
-
difficulty
public long difficulty()Returns the value of thedifficulty
record component.- Returns:
- the value of the
difficulty
record component
-
hash
Returns the value of thehash
record component.- Returns:
- the value of the
hash
record component
-
height
public long height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
majorVersion
public int majorVersion()Returns the value of themajorVersion
record component.- Returns:
- the value of the
majorVersion
record component
-
minorVersion
public int minorVersion()Returns the value of theminorVersion
record component.- Returns:
- the value of the
minorVersion
record component
-
nonce
public long nonce()Returns the value of thenonce
record component.- Returns:
- the value of the
nonce
record component
-
orphanStatus
public boolean orphanStatus()Returns the value of theorphanStatus
record component.- Returns:
- the value of the
orphanStatus
record component
-
prevHash
Returns the value of theprevHash
record component.- Returns:
- the value of the
prevHash
record component
-
reward
public long reward()Returns the value of thereward
record component.- Returns:
- the value of the
reward
record component
-
timestamp
public long timestamp()Returns the value of thetimestamp
record component.- Returns:
- the value of the
timestamp
record component
-