Record Class AccountInfo<T>

java.lang.Object
java.lang.Record
software.sava.rpc.json.http.response.AccountInfo<T>
All Implemented Interfaces:
software.sava.core.util.DecimalInteger, software.sava.core.util.DecimalIntegerAmount

public record AccountInfo<T>(software.sava.core.accounts.PublicKey pubKey, Context context, boolean executable, long lamports, software.sava.core.accounts.PublicKey owner, BigInteger rentEpoch, int space, T data) extends Record implements software.sava.core.util.DecimalIntegerAmount
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static BiFunction<software.sava.core.accounts.PublicKey,byte[],byte[]>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AccountInfo(software.sava.core.accounts.PublicKey pubKey, Context context, boolean executable, long lamports, software.sava.core.accounts.PublicKey owner, BigInteger rentEpoch, int space, T data)
    Creates an instance of a AccountInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    long
     
    static void
    cacheTables(Collection<AccountInfo<software.sava.core.accounts.lookup.AddressLookupTable>> tableAccounts, Map<software.sava.core.accounts.PublicKey,software.sava.core.accounts.lookup.AddressLookupTable> cache)
     
    Returns the value of the context record component.
    Returns the value of the data record component.
    int
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the executable record component.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the lamports record component.
    software.sava.core.accounts.PublicKey
    Returns the value of the owner record component.
    static <T> AccountInfo<T>
    parse(software.sava.core.accounts.PublicKey publicKey, systems.comodal.jsoniter.JsonIterator ji, Context context, BiFunction<software.sava.core.accounts.PublicKey,byte[],T> factory)
     
    static <T> AccountInfo<T>
    parseAccount(systems.comodal.jsoniter.JsonIterator ji, Context context, BiFunction<software.sava.core.accounts.PublicKey,byte[],T> factory)
     
    static <T> List<AccountInfo<T>>
    parseAccounts(systems.comodal.jsoniter.JsonIterator ji, Context context, BiFunction<software.sava.core.accounts.PublicKey,byte[],T> factory)
     
    static <T> List<AccountInfo<T>>
    parseAccountsFromKeys(SequencedCollection<software.sava.core.accounts.PublicKey> pubKeys, systems.comodal.jsoniter.JsonIterator ji, Context context, BiFunction<software.sava.core.accounts.PublicKey,byte[],T> factory)
     
    static <T> List<AccountInfo<T>>
    parseAccountsFromKeysWithNulls(SequencedCollection<software.sava.core.accounts.PublicKey> pubKeys, systems.comodal.jsoniter.JsonIterator ji, Context context, BiFunction<software.sava.core.accounts.PublicKey,byte[],T> factory)
     
    software.sava.core.accounts.PublicKey
    Returns the value of the pubKey record component.
    Returns the value of the rentEpoch record component.
    int
    Returns the value of the space 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

    Methods inherited from interface software.sava.core.util.DecimalInteger

    fromDecimal, toDecimal, toDecimal, toDecimal

    Methods inherited from interface software.sava.core.util.DecimalIntegerAmount

    toDecimal
  • Field Details

    • BYTES_IDENTITY

      public static BiFunction<software.sava.core.accounts.PublicKey,byte[],byte[]> BYTES_IDENTITY
  • Constructor Details

    • AccountInfo

      public AccountInfo(software.sava.core.accounts.PublicKey pubKey, Context context, boolean executable, long lamports, software.sava.core.accounts.PublicKey owner, BigInteger rentEpoch, int space, T data)
      Creates an instance of a AccountInfo record class.
      Parameters:
      pubKey - the value for the pubKey record component
      context - the value for the context record component
      executable - the value for the executable record component
      lamports - the value for the lamports record component
      owner - the value for the owner record component
      rentEpoch - the value for the rentEpoch record component
      space - the value for the space record component
      data - the value for the data record component
  • Method Details

    • cacheTables

      public static void cacheTables(Collection<AccountInfo<software.sava.core.accounts.lookup.AddressLookupTable>> tableAccounts, Map<software.sava.core.accounts.PublicKey,software.sava.core.accounts.lookup.AddressLookupTable> cache)
    • decimals

      public int decimals()
      Specified by:
      decimals in interface software.sava.core.util.DecimalInteger
    • amount

      public BigInteger amount()
      Specified by:
      amount in interface software.sava.core.util.DecimalIntegerAmount
    • asLong

      public long asLong()
      Specified by:
      asLong in interface software.sava.core.util.DecimalIntegerAmount
    • parse

      public static <T> AccountInfo<T> parse(software.sava.core.accounts.PublicKey publicKey, systems.comodal.jsoniter.JsonIterator ji, Context context, BiFunction<software.sava.core.accounts.PublicKey,byte[],T> factory)
    • parseAccountsFromKeys

      public static <T> List<AccountInfo<T>> parseAccountsFromKeys(SequencedCollection<software.sava.core.accounts.PublicKey> pubKeys, systems.comodal.jsoniter.JsonIterator ji, Context context, BiFunction<software.sava.core.accounts.PublicKey,byte[],T> factory)
    • parseAccountsFromKeysWithNulls

      public static <T> List<AccountInfo<T>> parseAccountsFromKeysWithNulls(SequencedCollection<software.sava.core.accounts.PublicKey> pubKeys, systems.comodal.jsoniter.JsonIterator ji, Context context, BiFunction<software.sava.core.accounts.PublicKey,byte[],T> factory)
    • parseAccount

      public static <T> AccountInfo<T> parseAccount(systems.comodal.jsoniter.JsonIterator ji, Context context, BiFunction<software.sava.core.accounts.PublicKey,byte[],T> factory)
    • parseAccounts

      public static <T> List<AccountInfo<T>> parseAccounts(systems.comodal.jsoniter.JsonIterator ji, Context context, BiFunction<software.sava.core.accounts.PublicKey,byte[],T> factory)
    • 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.
    • pubKey

      public software.sava.core.accounts.PublicKey pubKey()
      Returns the value of the pubKey record component.
      Returns:
      the value of the pubKey record component
    • context

      public Context context()
      Returns the value of the context record component.
      Returns:
      the value of the context record component
    • executable

      public boolean executable()
      Returns the value of the executable record component.
      Returns:
      the value of the executable record component
    • lamports

      public long lamports()
      Returns the value of the lamports record component.
      Returns:
      the value of the lamports record component
    • owner

      public software.sava.core.accounts.PublicKey owner()
      Returns the value of the owner record component.
      Returns:
      the value of the owner record component
    • rentEpoch

      public BigInteger rentEpoch()
      Returns the value of the rentEpoch record component.
      Returns:
      the value of the rentEpoch record component
    • space

      public int space()
      Returns the value of the space record component.
      Returns:
      the value of the space record component
    • data

      public T data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component