Record Class Scheduler.ScheduleResult.LowerPriorityThanQueuedCommand
java.lang.Object
java.lang.Record
org.wpilib.command3.Scheduler.ScheduleResult.LowerPriorityThanQueuedCommand
- Record Components:
command- the command that failed to be scheduledqueuedCommand- the queued command that prevented the command from being scheduled
- All Implemented Interfaces:
Scheduler.ScheduleResult, Scheduler.ScheduleResult.Failure
- Enclosing interface:
Scheduler.ScheduleResult
public static record Scheduler.ScheduleResult.LowerPriorityThanQueuedCommand(Command command, Command queuedCommand)
extends Record
implements Scheduler.ScheduleResult.Failure
A scheduling attempt that failed because the command was lower priority than a queued command
with shared requirements.
-
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
ConstructorsConstructorDescriptionLowerPriorityThanQueuedCommand(Command command, Command queuedCommand) Creates an instance of aLowerPriorityThanQueuedCommandrecord 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.Returns the value of thequeuedCommandrecord component.booleanA scheduling attempt that failed because the command was lower priority than a queued command with shared requirements is always unsuccessful.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LowerPriorityThanQueuedCommand
Creates an instance of aLowerPriorityThanQueuedCommandrecord class.- Parameters:
command- the value for thecommandrecord componentqueuedCommand- the value for thequeuedCommandrecord component
-
-
Method Details
-
successful
public boolean successful()A scheduling attempt that failed because the command was lower priority than a queued command with shared requirements is always unsuccessful.- Specified by:
successfulin interfaceScheduler.ScheduleResult- Specified by:
successfulin interfaceScheduler.ScheduleResult.Failure- Returns:
- false
-
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
-
queuedCommand
Returns the value of thequeuedCommandrecord component.- Returns:
- the value of the
queuedCommandrecord component
-