Record Class LockUp
java.lang.Object
java.lang.Record
software.sava.solana.programs.stake.LockUp
- All Implemented Interfaces:
software.sava.core.borsh.Borsh,software.sava.core.serial.Serializable
public record LockUp(long unixTimestamp, long epoch, software.sava.core.accounts.PublicKey custodian)
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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLockUp(long unixTimestamp, long epoch, software.sava.core.accounts.PublicKey custodian) Creates an instance of aLockUprecord class. -
Method Summary
Modifier and TypeMethodDescriptionsoftware.sava.core.accounts.PublicKeyReturns the value of thecustodianrecord component.longepoch()Returns the value of theepochrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intl()static LockUpread(byte[] data, int offset) final StringtoString()Returns a string representation of this record class.longReturns the value of theunixTimestamprecord 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
-
BYTES
public static final int BYTES- See Also:
-
NO_LOCKUP
-
-
Constructor Details
-
LockUp
public LockUp(long unixTimestamp, long epoch, software.sava.core.accounts.PublicKey custodian) Creates an instance of aLockUprecord class.- Parameters:
unixTimestamp- the value for theunixTimestamprecord componentepoch- the value for theepochrecord componentcustodian- the value for thecustodianrecord component
-
-
Method Details
-
read
-
l
public int l()- Specified by:
lin interfacesoftware.sava.core.serial.Serializable
-
write
public int write(byte[] data, int offset) - Specified by:
writein 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 '=='. -
unixTimestamp
public long unixTimestamp()Returns the value of theunixTimestamprecord component.- Returns:
- the value of the
unixTimestamprecord component
-
epoch
public long epoch()Returns the value of theepochrecord component.- Returns:
- the value of the
epochrecord component
-
custodian
public software.sava.core.accounts.PublicKey custodian()Returns the value of thecustodianrecord component.- Returns:
- the value of the
custodianrecord component
-