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

    Constructors
    Constructor
    Description
    Fee(long denominator, long numerator)
    Creates an instance of a Fee record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    long
    Returns the value of the denominator record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    l()
     
    long
    Returns the value of the numerator record component.
    double
     
    toRatio(int scale, RoundingMode roundingMode)
     
    toRatio(MathContext mathContext)
     
    final String
    Returns a string representation of this record class.
    int
    write(byte[] data, int offset)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.sava.core.borsh.Borsh

    writeOptional

    Methods inherited from interface software.sava.core.serial.Serializable

    reusable, write, write
  • Constructor Details

    • Fee

      public Fee(long denominator, long numerator)
      Creates an instance of a Fee record class.
      Parameters:
      denominator - the value for the denominator record component
      numerator - the value for the numerator record component
  • Method Details

    • toRatio

      public BigDecimal toRatio(MathContext mathContext)
    • toRatio

      public BigDecimal toRatio(int scale, RoundingMode roundingMode)
    • toRatio

      public double toRatio()
    • compareTo

      public int compareTo(StakePoolState.Fee o)
      Specified by:
      compareTo in interface Comparable<StakePoolState.Fee>
    • l

      public int l()
      Specified by:
      l in interface software.sava.core.serial.Serializable
    • write

      public int write(byte[] data, int offset)
      Specified by:
      write in interface software.sava.core.serial.Serializable
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • denominator

      public long denominator()
      Returns the value of the denominator record component.
      Returns:
      the value of the denominator record component
    • numerator

      public long numerator()
      Returns the value of the numerator record component.
      Returns:
      the value of the numerator record component