Record Class StakePoolState.Fee
java.lang.Object
java.lang.Record
software.sava.solana.programs.stakepool.StakePoolState.Fee
- All Implemented Interfaces:
Comparable<StakePoolState.Fee>,software.sava.core.borsh.Borsh,software.sava.core.serial.Serializable
- Enclosing class:
StakePoolState
public static record StakePoolState.Fee(long denominator, long numerator)
extends Record
implements Comparable<StakePoolState.Fee>, 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> -
Constructor Summary
ConstructorsConstructorDescriptionFee(long denominator, long numerator) Creates an instance of aFeerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintlongReturns the value of thedenominatorrecord 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 thenumeratorrecord component.doubletoRatio()toRatio(int scale, RoundingMode roundingMode) toRatio(MathContext mathContext) 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.borsh.Borsh
writeOptionalMethods inherited from interface software.sava.core.serial.Serializable
reusable, write, write
-
Constructor Details
-
Fee
public Fee(long denominator, long numerator) Creates an instance of aFeerecord class.- Parameters:
denominator- the value for thedenominatorrecord componentnumerator- the value for thenumeratorrecord component
-
-
Method Details
-
toRatio
-
toRatio
-
toRatio
public double toRatio() -
compareTo
- Specified by:
compareToin interfaceComparable<StakePoolState.Fee>
-
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. All components in this record class are compared with '=='. -
denominator
public long denominator()Returns the value of thedenominatorrecord component.- Returns:
- the value of the
denominatorrecord component
-
numerator
public long numerator()Returns the value of thenumeratorrecord component.- Returns:
- the value of the
numeratorrecord component
-