Module software.sava.core
Record Class InterestBearingConfig
java.lang.Object
java.lang.Record
software.sava.core.accounts.token.extensions.InterestBearingConfig
- All Implemented Interfaces:
MintTokenExtension,TokenExtension,Serializable
public record InterestBearingConfig(PublicKey rateAuthority, long unixTimestamp, int preUpdateAverageRate, long lastUpdateTimestamp, int currentRate)
extends Record
implements MintTokenExtension
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInterestBearingConfig(PublicKey rateAuthority, long unixTimestamp, int preUpdateAverageRate, long lastUpdateTimestamp, int currentRate) Creates an instance of aInterestBearingConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecurrentRaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intl()longReturns the value of thelastUpdateTimestamprecord component.intReturns the value of thepreUpdateAverageRaterecord component.Returns the value of therateAuthorityrecord component.static InterestBearingConfigread(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.accounts.token.extensions.MintTokenExtension
ordinalMethods inherited from interface software.sava.core.serial.Serializable
reusable, write, write
-
Field Details
-
BYTES
public static final int BYTES- See Also:
-
-
Constructor Details
-
InterestBearingConfig
public InterestBearingConfig(PublicKey rateAuthority, long unixTimestamp, int preUpdateAverageRate, long lastUpdateTimestamp, int currentRate) Creates an instance of aInterestBearingConfigrecord class.- Parameters:
rateAuthority- the value for therateAuthorityrecord componentunixTimestamp- the value for theunixTimestamprecord componentpreUpdateAverageRate- the value for thepreUpdateAverageRaterecord componentlastUpdateTimestamp- the value for thelastUpdateTimestamprecord componentcurrentRate- the value for thecurrentRaterecord component
-
-
Method Details
-
read
-
extensionType
- Specified by:
extensionTypein interfaceTokenExtension
-
l
public int l()- Specified by:
lin interfaceSerializable
-
write
public int write(byte[] data, int offset) - Specified by:
writein interfaceSerializable
-
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 '=='. -
rateAuthority
Returns the value of therateAuthorityrecord component.- Returns:
- the value of the
rateAuthorityrecord component
-
unixTimestamp
public long unixTimestamp()Returns the value of theunixTimestamprecord component.- Returns:
- the value of the
unixTimestamprecord component
-
preUpdateAverageRate
public int preUpdateAverageRate()Returns the value of thepreUpdateAverageRaterecord component.- Returns:
- the value of the
preUpdateAverageRaterecord component
-
lastUpdateTimestamp
public long lastUpdateTimestamp()Returns the value of thelastUpdateTimestamprecord component.- Returns:
- the value of the
lastUpdateTimestamprecord component
-
currentRate
public int currentRate()Returns the value of thecurrentRaterecord component.- Returns:
- the value of the
currentRaterecord component
-