Record Class Mint

java.lang.Object
java.lang.Record
software.sava.core.accounts.token.Mint
All Implemented Interfaces:
Serializable

public record Mint(PublicKey address, PublicKey mintAuthority, long supply, int decimals, boolean initialized, PublicKey freezeAuthority) extends Record implements Serializable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final BiFunction<PublicKey,byte[],Mint>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Mint(PublicKey address, PublicKey mintAuthority, long supply, int decimals, boolean initialized, PublicKey freezeAuthority)
    Creates an instance of a Mint record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the address record component.
    int
    Returns the value of the decimals record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the freezeAuthority record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the initialized record component.
    int
    l()
     
    Returns the value of the mintAuthority record component.
    static Mint
    read(PublicKey address, byte[] data)
     
    long
    Returns the value of the supply record component.
    final String
    Returns a string representation of this record class.
    int
    write(byte[] data, int offset)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.sava.core.serial.Serializable

    reusable, write, write
  • Field Details

  • Constructor Details

    • Mint

      public Mint(PublicKey address, PublicKey mintAuthority, long supply, int decimals, boolean initialized, PublicKey freezeAuthority)
      Creates an instance of a Mint record class.
      Parameters:
      address - the value for the address record component
      mintAuthority - the value for the mintAuthority record component
      supply - the value for the supply record component
      decimals - the value for the decimals record component
      initialized - the value for the initialized record component
      freezeAuthority - the value for the freezeAuthority record component
  • Method Details

    • read

      public static Mint read(PublicKey address, byte[] data)
    • write

      public int write(byte[] data, int offset)
      Specified by:
      write in interface Serializable
    • l

      public int l()
      Specified by:
      l in interface Serializable
    • 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.
    • address

      public PublicKey address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component
    • mintAuthority

      public PublicKey mintAuthority()
      Returns the value of the mintAuthority record component.
      Returns:
      the value of the mintAuthority record component
    • supply

      public long supply()
      Returns the value of the supply record component.
      Returns:
      the value of the supply record component
    • decimals

      public int decimals()
      Returns the value of the decimals record component.
      Returns:
      the value of the decimals record component
    • initialized

      public boolean initialized()
      Returns the value of the initialized record component.
      Returns:
      the value of the initialized record component
    • freezeAuthority

      public PublicKey freezeAuthority()
      Returns the value of the freezeAuthority record component.
      Returns:
      the value of the freezeAuthority record component