Record Class BreakStartedEvent
java.lang.Object
java.lang.Record
com.botwithus.bot.api.event.BreakStartedEvent
- Record Components:
durationSeconds- the scheduled break duration in secondsfatigue- the fatigue level at break start [0,1]risk- the cumulative risk at break starttimestamp- event creation time in milliseconds since epoch
- All Implemented Interfaces:
GameEvent
-
Constructor Summary
ConstructorsConstructorDescriptionBreakStartedEvent(int durationSeconds, double fatigue, double risk) BreakStartedEvent(int durationSeconds, double fatigue, double risk, long timestamp) Creates an instance of aBreakStartedEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedurationSecondsrecord component.final booleanIndicates whether some other object is "equal to" this one.doublefatigue()Returns the value of thefatiguerecord component.final inthashCode()Returns a hash code value for this object.doublerisk()Returns the value of theriskrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BreakStartedEvent
public BreakStartedEvent(int durationSeconds, double fatigue, double risk) -
BreakStartedEvent
public BreakStartedEvent(int durationSeconds, double fatigue, double risk, long timestamp) Creates an instance of aBreakStartedEventrecord class.- Parameters:
durationSeconds- the value for thedurationSecondsrecord componentfatigue- the value for thefatiguerecord componentrisk- the value for theriskrecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
durationSeconds
public int durationSeconds()Returns the value of thedurationSecondsrecord component.- Returns:
- the value of the
durationSecondsrecord component
-
fatigue
-
risk
-
timestamp
-