Record Class ValidatorList
java.lang.Object
java.lang.Record
software.sava.solana.programs.stakepool.ValidatorList
- All Implemented Interfaces:
software.sava.core.borsh.Borsh,software.sava.core.serial.Serializable
public record ValidatorList(software.sava.core.accounts.PublicKey address, AccountType accountType, int maxValidators, ValidatorStakeInfo[] validators)
extends Record
implements software.sava.core.borsh.Borsh
-
Nested Class Summary
Nested classes/interfaces inherited from interface software.sava.core.borsh.Borsh
software.sava.core.borsh.Borsh.Enum, software.sava.core.borsh.Borsh.Factory<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BiFunction<software.sava.core.accounts.PublicKey, byte[], ValidatorList> -
Constructor Summary
ConstructorsConstructorDescriptionValidatorList(software.sava.core.accounts.PublicKey address, AccountType accountType, int maxValidators, ValidatorStakeInfo[] validators) Creates an instance of aValidatorListrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccountTyperecord component.software.sava.core.accounts.PublicKeyaddress()Returns the value of theaddressrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intl()intReturns the value of themaxValidatorsrecord component.static ValidatorListread(byte[] data, int offset) static ValidatorListread(software.sava.core.accounts.PublicKey publicKey, byte[] data) static ValidatorListread(software.sava.core.accounts.PublicKey publicKey, byte[] data, int offset) final StringtoString()Returns a string representation of this record class.Returns the value of thevalidatorsrecord component.intwrite(byte[] data, int offset) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.sava.core.borsh.Borsh
writeOptionalMethods inherited from interface software.sava.core.serial.Serializable
reusable, write, write
-
Field Details
-
FACTORY
-
-
Constructor Details
-
ValidatorList
public ValidatorList(software.sava.core.accounts.PublicKey address, AccountType accountType, int maxValidators, ValidatorStakeInfo[] validators) Creates an instance of aValidatorListrecord class.- Parameters:
address- the value for theaddressrecord componentaccountType- the value for theaccountTyperecord componentmaxValidators- the value for themaxValidatorsrecord componentvalidators- the value for thevalidatorsrecord component
-
-
Method Details
-
read
-
read
-
read
public static ValidatorList read(software.sava.core.accounts.PublicKey publicKey, byte[] data, int offset) -
write
public int write(byte[] data, int offset) - Specified by:
writein interfacesoftware.sava.core.serial.Serializable
-
l
public int l()- Specified by:
lin interfacesoftware.sava.core.serial.Serializable
-
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 '=='. -
address
public software.sava.core.accounts.PublicKey address()Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
accountType
Returns the value of theaccountTyperecord component.- Returns:
- the value of the
accountTyperecord component
-
maxValidators
public int maxValidators()Returns the value of themaxValidatorsrecord component.- Returns:
- the value of the
maxValidatorsrecord component
-
validators
Returns the value of thevalidatorsrecord component.- Returns:
- the value of the
validatorsrecord component
-