Package frc.robot.lib.BLine
Record Class Path.EventTrigger
java.lang.Object
java.lang.Record
frc.robot.lib.BLine.Path.EventTrigger
- Record Components:
t_ratio- The position along the segment (0-1) where this event should triggerlibKey- The key used to look up the registered action
- All Implemented Interfaces:
Path.PathElement
- Enclosing class:
- Path
public static record Path.EventTrigger(double t_ratio, String libKey)
extends Record
implements Path.PathElement
An event trigger that fires a user-registered action at a t_ratio along a segment.
Event triggers are placed between translation targets and use their t_ratio to determine when the action should fire along the segment.
-
Constructor Summary
ConstructorsConstructorDescriptionEventTrigger(double t_ratio, String libKey) Creates an instance of aEventTriggerrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a copy of this event trigger.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.libKey()Returns the value of thelibKeyrecord component.doublet_ratio()Returns the value of thet_ratiorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
copy
Creates a copy of this event trigger.- Specified by:
copyin interfacePath.PathElement- Returns:
- A new EventTrigger with the same values
-
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
public final int 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 '=='. -
t_ratio
public double t_ratio()Returns the value of thet_ratiorecord component.- Returns:
- the value of the
t_ratiorecord component
-
libKey
Returns the value of thelibKeyrecord component.- Returns:
- the value of the
libKeyrecord component
-