java.lang.Object
java.lang.Record
net.lageto.monero.rpc.model.BlockHeader
-
Constructor Summary
ConstructorsConstructorDescriptionBlockHeader(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 aBlockHeaderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theblockSizerecord component.longdepth()Returns the value of thedepthrecord component.longReturns the value of thedifficultyrecord component.booleanIndicates whether some other object is "equal to" this one.hash()Returns the value of thehashrecord component.inthashCode()Returns a hash code value for this object.longheight()Returns the value of theheightrecord component.intReturns the value of themajorVersionrecord component.intReturns the value of theminorVersionrecord component.longnonce()Returns the value of thenoncerecord component.booleanReturns the value of theorphanStatusrecord component.prevHash()Returns the value of theprevHashrecord component.longreward()Returns the value of therewardrecord component.longReturns the value of thetimestamprecord 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 aBlockHeaderrecord class.- Parameters:
blockSize- the value for theblockSizerecord componentdepth- the value for thedepthrecord componentdifficulty- the value for thedifficultyrecord componenthash- the value for thehashrecord componentheight- the value for theheightrecord componentmajorVersion- the value for themajorVersionrecord componentminorVersion- the value for theminorVersionrecord componentnonce- the value for thenoncerecord componentorphanStatus- the value for theorphanStatusrecord componentprevHash- the value for theprevHashrecord componentreward- the value for therewardrecord componenttimestamp- the value for thetimestamprecord 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 theblockSizerecord component.- Returns:
- the value of the
blockSizerecord component
-
depth
public long depth()Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-
difficulty
public long difficulty()Returns the value of thedifficultyrecord component.- Returns:
- the value of the
difficultyrecord component
-
hash
Returns the value of thehashrecord component.- Returns:
- the value of the
hashrecord component
-
height
public long height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
majorVersion
public int majorVersion()Returns the value of themajorVersionrecord component.- Returns:
- the value of the
majorVersionrecord component
-
minorVersion
public int minorVersion()Returns the value of theminorVersionrecord component.- Returns:
- the value of the
minorVersionrecord component
-
nonce
public long nonce()Returns the value of thenoncerecord component.- Returns:
- the value of the
noncerecord component
-
orphanStatus
public boolean orphanStatus()Returns the value of theorphanStatusrecord component.- Returns:
- the value of the
orphanStatusrecord component
-
prevHash
Returns the value of theprevHashrecord component.- Returns:
- the value of the
prevHashrecord component
-
reward
public long reward()Returns the value of therewardrecord component.- Returns:
- the value of the
rewardrecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-