Record Class Merkle.PatriciaTreePath

java.lang.Object
java.lang.Record
org.symbol.sdk.symbol.Merkle.PatriciaTreePath
Enclosing class:
Merkle

public static record Merkle.PatriciaTreePath(byte[] path, int size) extends Record
PatriciaTreePath
Path in a Patricia merkle tree.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PatriciaTreePath(byte[] path, int size)
    Creates an instance of a PatriciaTreePath record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    byte[]
    Returns the value of the path record component.
    int
    Returns the value of the size record component.
    final String
    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

    • PatriciaTreePath

      public PatriciaTreePath(byte[] path, int size)
      Creates an instance of a PatriciaTreePath record class.
      Parameters:
      path - the value for the path record component
      size - the value for the size record component
  • Method Details

    • equals

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

      public int hashCode()
      PatriciaTreePath.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
    • toString

      public final String toString()
      PatriciaTreePath.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
    • path

      public byte[] path()
      PatriciaTreePath.path
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • size

      public int size()
      PatriciaTreePath.size
      Returns the value of the size record component.
      Returns:
      the value of the size record component