Record Class VoteInit
java.lang.Object
java.lang.Record
software.sava.solana.programs.vote.VoteInit
- All Implemented Interfaces:
software.sava.core.serial.Serializable
public record VoteInit(software.sava.core.accounts.PublicKey nodePubkey, software.sava.core.accounts.PublicKey authorizedVoter, software.sava.core.accounts.PublicKey authorizedWithdrawer, int commission)
extends Record
implements software.sava.core.serial.Serializable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVoteInit(software.sava.core.accounts.PublicKey nodePubkey, software.sava.core.accounts.PublicKey authorizedVoter, software.sava.core.accounts.PublicKey authorizedWithdrawer, int commission) Creates an instance of aVoteInitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionsoftware.sava.core.accounts.PublicKeyReturns the value of theauthorizedVoterrecord component.software.sava.core.accounts.PublicKeyReturns the value of theauthorizedWithdrawerrecord component.intReturns the value of thecommissionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intl()software.sava.core.accounts.PublicKeyReturns the value of thenodePubkeyrecord component.static VoteInitread(byte[] data, int offset) final StringtoString()Returns a string representation of this record class.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.serial.Serializable
reusable, write, write
-
Field Details
-
BYTES
public static final int BYTES- See Also:
-
-
Constructor Details
-
VoteInit
public VoteInit(software.sava.core.accounts.PublicKey nodePubkey, software.sava.core.accounts.PublicKey authorizedVoter, software.sava.core.accounts.PublicKey authorizedWithdrawer, int commission) Creates an instance of aVoteInitrecord class.- Parameters:
nodePubkey- the value for thenodePubkeyrecord componentauthorizedVoter- the value for theauthorizedVoterrecord componentauthorizedWithdrawer- the value for theauthorizedWithdrawerrecord componentcommission- the value for thecommissionrecord component
-
-
Method Details
-
read
-
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 '=='. -
nodePubkey
public software.sava.core.accounts.PublicKey nodePubkey()Returns the value of thenodePubkeyrecord component.- Returns:
- the value of the
nodePubkeyrecord component
-
authorizedVoter
public software.sava.core.accounts.PublicKey authorizedVoter()Returns the value of theauthorizedVoterrecord component.- Returns:
- the value of the
authorizedVoterrecord component
-
authorizedWithdrawer
public software.sava.core.accounts.PublicKey authorizedWithdrawer()Returns the value of theauthorizedWithdrawerrecord component.- Returns:
- the value of the
authorizedWithdrawerrecord component
-
commission
public int commission()Returns the value of thecommissionrecord component.- Returns:
- the value of the
commissionrecord component
-