Package org.wpilib.commands3
Record Class SchedulerEvent.Canceled
java.lang.Object
java.lang.Record
org.wpilib.commands3.SchedulerEvent.Canceled
- Record Components:
command- The command that was canceledtimestampMicros- When the command was canceled
- All Implemented Interfaces:
SchedulerEvent
- Enclosing interface:
SchedulerEvent
public static record SchedulerEvent.Canceled(Command command, long timestampMicros)
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 org.wpilib.commands3.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 thetimestampMicrosrecord 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 componenttimestampMicros- the value for thetimestampMicrosrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
command
Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-
timestampMicros
Returns the value of thetimestampMicrosrecord component.- Specified by:
timestampMicrosin interfaceSchedulerEvent- Returns:
- the value of the
timestampMicrosrecord component - See Also:
-