Record Class Scheduler.ScheduleResult.AlreadyRunning
java.lang.Object
java.lang.Record
org.wpilib.command3.Scheduler.ScheduleResult.AlreadyRunning
- Record Components:
command- the command that was attempted to be scheduled
- All Implemented Interfaces:
Scheduler.ScheduleResult, Scheduler.ScheduleResult.Successful
- Enclosing interface:
Scheduler.ScheduleResult
public static record Scheduler.ScheduleResult.AlreadyRunning(Command command)
extends Record
implements Scheduler.ScheduleResult.Successful
A scheduling attempt that was redundant because the command was already running.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Scheduler.ScheduleResult
Scheduler.ScheduleResult.AlreadyRunning, Scheduler.ScheduleResult.Failure, Scheduler.ScheduleResult.LowerPriorityThanQueuedCommand, Scheduler.ScheduleResult.LowerPriorityThanRunningCommand, Scheduler.ScheduleResult.Success, Scheduler.ScheduleResult.Successful -
Constructor Summary
ConstructorsConstructorDescriptionAlreadyRunning(Command command) Creates an instance of aAlreadyRunningrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncommand()Returns the value of thecommandrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanA scheduling attempt that was redundant because the command was already running is always successful.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AlreadyRunning
-
-
Method Details
-
successful
public boolean successful()A scheduling attempt that was redundant because the command was already running is always successful.- Specified by:
successfulin interfaceScheduler.ScheduleResult- Specified by:
successfulin interfaceScheduler.ScheduleResult.Successful- Returns:
- true
-
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). -
command
Returns the value of thecommandrecord component.- Specified by:
commandin interfaceScheduler.ScheduleResult- Returns:
- the value of the
commandrecord component
-