Record Class SchedulerEvent.Canceled
java.lang.Object
java.lang.Record
org.wpilib.command3.SchedulerEvent.Canceled
- Record Components:
command- The command that was canceledtimestampNanos- When the command was canceled
- All Implemented Interfaces:
SchedulerEvent
- Enclosing interface:
SchedulerEvent
public static record SchedulerEvent.Canceled(Command command, long timestampNanos)
extends Record
implements SchedulerEvent
An event marking when a command was canceled. If the command was canceled because it was
interrupted by another command, an
SchedulerEvent.Interrupted will be emitted immediately prior to the
cancellation event.-
Nested Class Summary
Nested classes/interfaces inherited from interface SchedulerEvent
SchedulerEvent.Canceled, SchedulerEvent.Completed, SchedulerEvent.CompletedWithError, SchedulerEvent.Interrupted, SchedulerEvent.Mounted, SchedulerEvent.Scheduled, SchedulerEvent.Yielded -
Constructor Summary
Constructors -
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.longReturns the value of thetimestampNanosrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Canceled
Creates an instance of aCanceledrecord class.- Parameters:
command- the value for thecommandrecord componenttimestampNanos- the value for thetimestampNanosrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
command
-
timestampNanos
public long timestampNanos()Returns the value of thetimestampNanosrecord component.- Specified by:
timestampNanosin interfaceSchedulerEvent- Returns:
- the value of the
timestampNanosrecord component - See Also:
-