Record Class ScriptScheduler.ScheduledEntry
java.lang.Object
java.lang.Record
com.botwithus.bot.api.script.ScriptScheduler.ScheduledEntry
- Record Components:
id- unique schedule IDscriptName- the script to runnextRun- when the next execution is plannedinterval- repeat interval, ornullfor one-shotmaxDuration- auto-stop duration, ornullfor unlimited
- Enclosing interface:
ScriptScheduler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.interval()Returns the value of theintervalrecord component.Returns the value of themaxDurationrecord component.nextRun()Returns the value of thenextRunrecord component.Returns the value of thescriptNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScheduledEntry
public ScheduledEntry(String id, String scriptName, Instant nextRun, Duration interval, Duration maxDuration) Creates an instance of aScheduledEntryrecord class.- Parameters:
id- the value for theidrecord componentscriptName- the value for thescriptNamerecord componentnextRun- the value for thenextRunrecord componentinterval- the value for theintervalrecord componentmaxDuration- the value for themaxDurationrecord 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 withObjects::equals(Object,Object). -
id
-
scriptName
Returns the value of thescriptNamerecord component.- Returns:
- the value of the
scriptNamerecord component
-
nextRun
-
interval
-
maxDuration
Returns the value of themaxDurationrecord component.- Returns:
- the value of the
maxDurationrecord component
-