Record Class BlockHeader

java.lang.Object
java.lang.Record
net.lageto.monero.rpc.model.BlockHeader

public record 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) extends Record
See Also:
DaemonRpcClient.getBlockHeader(String), DaemonRpcClient.getBlockHeader(long)
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 a BlockHeader record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the blockSize record component.
    long
    Returns the value of the depth record component.
    long
    Returns the value of the difficulty record component.
    boolean
    equals​(Object o)
    Indicates whether some other object is "equal to" this one.
    Returns the value of the hash record component.
    int
    Returns a hash code value for this object.
    long
    Returns the value of the height record component.
    int
    Returns the value of the majorVersion record component.
    int
    Returns the value of the minorVersion record component.
    long
    Returns the value of the nonce record component.
    boolean
    Returns the value of the orphanStatus record component.
    Returns the value of the prevHash record component.
    long
    Returns the value of the reward record component.
    long
    Returns the value of the timestamp record component.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a BlockHeader record class.
      Parameters:
      blockSize - the value for the blockSize record component
      depth - the value for the depth record component
      difficulty - the value for the difficulty record component
      hash - the value for the hash record component
      height - the value for the height record component
      majorVersion - the value for the majorVersion record component
      minorVersion - the value for the minorVersion record component
      nonce - the value for the nonce record component
      orphanStatus - the value for the orphanStatus record component
      prevHash - the value for the prevHash record component
      reward - the value for the reward record component
      timestamp - the value for the timestamp record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • blockSize

      public int blockSize()
      Returns the value of the blockSize record component.
      Returns:
      the value of the blockSize record component
    • depth

      public long depth()
      Returns the value of the depth record component.
      Returns:
      the value of the depth record component
    • difficulty

      public long difficulty()
      Returns the value of the difficulty record component.
      Returns:
      the value of the difficulty record component
    • hash

      public String hash()
      Returns the value of the hash record component.
      Returns:
      the value of the hash record component
    • height

      public long height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • majorVersion

      public int majorVersion()
      Returns the value of the majorVersion record component.
      Returns:
      the value of the majorVersion record component
    • minorVersion

      public int minorVersion()
      Returns the value of the minorVersion record component.
      Returns:
      the value of the minorVersion record component
    • nonce

      public long nonce()
      Returns the value of the nonce record component.
      Returns:
      the value of the nonce record component
    • orphanStatus

      public boolean orphanStatus()
      Returns the value of the orphanStatus record component.
      Returns:
      the value of the orphanStatus record component
    • prevHash

      public String prevHash()
      Returns the value of the prevHash record component.
      Returns:
      the value of the prevHash record component
    • reward

      public long reward()
      Returns the value of the reward record component.
      Returns:
      the value of the reward record component
    • timestamp

      public long timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component