Record Class InputBoosterStats.Snapshot

java.lang.Object
java.lang.Record
dev.inputbooster.api.util.InputBoosterStats.Snapshot
Enclosing class:
InputBoosterStats

public static record InputBoosterStats.Snapshot(boolean loaded, boolean active, boolean autoMode, boolean burstModeActive, int pollRateHz, int fps, int currentCps, int maxCps, long recoveredInputs, long totalHits, double averageLatencyMs, double peakLatencyMs) extends Record
Immutable snapshot of the most commonly displayed InputBooster stats.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Snapshot(boolean loaded, boolean active, boolean autoMode, boolean burstModeActive, int pollRateHz, int fps, int currentCps, int maxCps, long recoveredInputs, long totalHits, double averageLatencyMs, double peakLatencyMs)
    Creates an instance of a Snapshot record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the active record component.
    boolean
    Returns the value of the autoMode record component.
    double
    Returns the value of the averageLatencyMs record component.
    boolean
    Returns the value of the burstModeActive record component.
    int
    Returns the value of the currentCps record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    fps()
    Returns the value of the fps record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the loaded record component.
    int
    Returns the value of the maxCps record component.
    double
    Returns the value of the peakLatencyMs record component.
    int
    Returns the value of the pollRateHz record component.
    long
    Returns the value of the recoveredInputs record component.
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the totalHits record component.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Snapshot

      public Snapshot(boolean loaded, boolean active, boolean autoMode, boolean burstModeActive, int pollRateHz, int fps, int currentCps, int maxCps, long recoveredInputs, long totalHits, double averageLatencyMs, double peakLatencyMs)
      Creates an instance of a Snapshot record class.
      Parameters:
      loaded - the value for the loaded record component
      active - the value for the active record component
      autoMode - the value for the autoMode record component
      burstModeActive - the value for the burstModeActive record component
      pollRateHz - the value for the pollRateHz record component
      fps - the value for the fps record component
      currentCps - the value for the currentCps record component
      maxCps - the value for the maxCps record component
      recoveredInputs - the value for the recoveredInputs record component
      totalHits - the value for the totalHits record component
      averageLatencyMs - the value for the averageLatencyMs record component
      peakLatencyMs - the value for the peakLatencyMs record component
  • Method Details

    • unloaded

      public static InputBoosterStats.Snapshot unloaded()
    • 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.
    • loaded

      public boolean loaded()
      Returns the value of the loaded record component.
      Returns:
      the value of the loaded record component
    • active

      public boolean active()
      Returns the value of the active record component.
      Returns:
      the value of the active record component
    • autoMode

      public boolean autoMode()
      Returns the value of the autoMode record component.
      Returns:
      the value of the autoMode record component
    • burstModeActive

      public boolean burstModeActive()
      Returns the value of the burstModeActive record component.
      Returns:
      the value of the burstModeActive record component
    • pollRateHz

      public int pollRateHz()
      Returns the value of the pollRateHz record component.
      Returns:
      the value of the pollRateHz record component
    • fps

      public int fps()
      Returns the value of the fps record component.
      Returns:
      the value of the fps record component
    • currentCps

      public int currentCps()
      Returns the value of the currentCps record component.
      Returns:
      the value of the currentCps record component
    • maxCps

      public int maxCps()
      Returns the value of the maxCps record component.
      Returns:
      the value of the maxCps record component
    • recoveredInputs

      public long recoveredInputs()
      Returns the value of the recoveredInputs record component.
      Returns:
      the value of the recoveredInputs record component
    • totalHits

      public long totalHits()
      Returns the value of the totalHits record component.
      Returns:
      the value of the totalHits record component
    • averageLatencyMs

      public double averageLatencyMs()
      Returns the value of the averageLatencyMs record component.
      Returns:
      the value of the averageLatencyMs record component
    • peakLatencyMs

      public double peakLatencyMs()
      Returns the value of the peakLatencyMs record component.
      Returns:
      the value of the peakLatencyMs record component