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
FieldsModifier and TypeFieldDescriptionstatic BiFunction<software.sava.core.accounts.PublicKey, byte[], byte[]> -
Constructor Summary
ConstructorsConstructorDescriptionAccountInfo(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 aAccountInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionamount()longasLong()static voidcacheTables(Collection<AccountInfo<software.sava.core.accounts.lookup.AddressLookupTable>> tableAccounts, Map<software.sava.core.accounts.PublicKey, software.sava.core.accounts.lookup.AddressLookupTable> cache) context()Returns the value of thecontextrecord component.data()Returns the value of thedatarecord component.intdecimals()final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theexecutablerecord component.final inthashCode()Returns a hash code value for this object.longlamports()Returns the value of thelamportsrecord component.software.sava.core.accounts.PublicKeyowner()Returns the value of theownerrecord 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.PublicKeypubKey()Returns the value of thepubKeyrecord component.Returns the value of therentEpochrecord component.intspace()Returns the value of thespacerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.sava.core.util.DecimalInteger
fromDecimal, toDecimal, toDecimal, toDecimalMethods inherited from interface software.sava.core.util.DecimalIntegerAmount
toDecimal
-
Field Details
-
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 aAccountInforecord class.- Parameters:
pubKey- the value for thepubKeyrecord componentcontext- the value for thecontextrecord componentexecutable- the value for theexecutablerecord componentlamports- the value for thelamportsrecord componentowner- the value for theownerrecord componentrentEpoch- the value for therentEpochrecord componentspace- the value for thespacerecord componentdata- the value for thedatarecord 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:
decimalsin interfacesoftware.sava.core.util.DecimalInteger
-
amount
- Specified by:
amountin interfacesoftware.sava.core.util.DecimalIntegerAmount
-
asLong
public long asLong()- Specified by:
asLongin interfacesoftware.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
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 '=='. -
pubKey
public software.sava.core.accounts.PublicKey pubKey()Returns the value of thepubKeyrecord component.- Returns:
- the value of the
pubKeyrecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-
executable
public boolean executable()Returns the value of theexecutablerecord component.- Returns:
- the value of the
executablerecord component
-
lamports
public long lamports()Returns the value of thelamportsrecord component.- Returns:
- the value of the
lamportsrecord component
-
owner
public software.sava.core.accounts.PublicKey owner()Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
rentEpoch
Returns the value of therentEpochrecord component.- Returns:
- the value of the
rentEpochrecord component
-
space
public int space()Returns the value of thespacerecord component.- Returns:
- the value of the
spacerecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-