Package dev.inputbooster.api.util
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
ConstructorsConstructorDescriptionSnapshot(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 aSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.booleanautoMode()Returns the value of theautoModerecord component.doubleReturns the value of theaverageLatencyMsrecord component.booleanReturns the value of theburstModeActiverecord component.intReturns the value of thecurrentCpsrecord component.final booleanIndicates whether some other object is "equal to" this one.intfps()Returns the value of thefpsrecord component.final inthashCode()Returns a hash code value for this object.booleanloaded()Returns the value of theloadedrecord component.intmaxCps()Returns the value of themaxCpsrecord component.doubleReturns the value of thepeakLatencyMsrecord component.intReturns the value of thepollRateHzrecord component.longReturns the value of therecoveredInputsrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalHitsrecord component.static InputBoosterStats.Snapshotunloaded()
-
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 aSnapshotrecord class.- Parameters:
loaded- the value for theloadedrecord componentactive- the value for theactiverecord componentautoMode- the value for theautoModerecord componentburstModeActive- the value for theburstModeActiverecord componentpollRateHz- the value for thepollRateHzrecord componentfps- the value for thefpsrecord componentcurrentCps- the value for thecurrentCpsrecord componentmaxCps- the value for themaxCpsrecord componentrecoveredInputs- the value for therecoveredInputsrecord componenttotalHits- the value for thetotalHitsrecord componentaverageLatencyMs- the value for theaverageLatencyMsrecord componentpeakLatencyMs- the value for thepeakLatencyMsrecord component
-
-
Method Details
-
unloaded
-
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 '=='. -
loaded
public boolean loaded()Returns the value of theloadedrecord component.- Returns:
- the value of the
loadedrecord component
-
active
public boolean active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-
autoMode
public boolean autoMode()Returns the value of theautoModerecord component.- Returns:
- the value of the
autoModerecord component
-
burstModeActive
public boolean burstModeActive()Returns the value of theburstModeActiverecord component.- Returns:
- the value of the
burstModeActiverecord component
-
pollRateHz
public int pollRateHz()Returns the value of thepollRateHzrecord component.- Returns:
- the value of the
pollRateHzrecord component
-
fps
public int fps()Returns the value of thefpsrecord component.- Returns:
- the value of the
fpsrecord component
-
currentCps
public int currentCps()Returns the value of thecurrentCpsrecord component.- Returns:
- the value of the
currentCpsrecord component
-
maxCps
public int maxCps()Returns the value of themaxCpsrecord component.- Returns:
- the value of the
maxCpsrecord component
-
recoveredInputs
public long recoveredInputs()Returns the value of therecoveredInputsrecord component.- Returns:
- the value of the
recoveredInputsrecord component
-
totalHits
public long totalHits()Returns the value of thetotalHitsrecord component.- Returns:
- the value of the
totalHitsrecord component
-
averageLatencyMs
public double averageLatencyMs()Returns the value of theaverageLatencyMsrecord component.- Returns:
- the value of the
averageLatencyMsrecord component
-
peakLatencyMs
public double peakLatencyMs()Returns the value of thepeakLatencyMsrecord component.- Returns:
- the value of the
peakLatencyMsrecord component
-