Record Class CalculatorNode
java.lang.Object
java.lang.Record
xbot.common.subsystems.drive.CalculatorNode
public record CalculatorNode(org.wpilib.units.measure.Time operationTime, org.wpilib.units.measure.LinearAcceleration operationAcceleration, org.wpilib.units.measure.LinearVelocity operationEndingVelocity)
extends Record
CalculatorNodes are small little steps to be interpreted and formed together to create a path to be used for the
SwerveKinematicsCalculator
-
Constructor Summary
ConstructorsConstructorDescriptionCalculatorNode(double operationTimeInSeconds, double operationAcceleration, double operationEndingVelocity) CalculatorNode(org.wpilib.units.measure.Time operationTime, org.wpilib.units.measure.LinearAcceleration operationAcceleration, org.wpilib.units.measure.LinearVelocity operationEndingVelocity) Creates an instance of aCalculatorNoderecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.wpilib.units.measure.LinearAccelerationReturns the value of theoperationAccelerationrecord component.org.wpilib.units.measure.LinearVelocityReturns the value of theoperationEndingVelocityrecord component.org.wpilib.units.measure.TimeReturns the value of theoperationTimerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CalculatorNode
public CalculatorNode(double operationTimeInSeconds, double operationAcceleration, double operationEndingVelocity) -
CalculatorNode
public CalculatorNode(org.wpilib.units.measure.Time operationTime, org.wpilib.units.measure.LinearAcceleration operationAcceleration, org.wpilib.units.measure.LinearVelocity operationEndingVelocity) Creates an instance of aCalculatorNoderecord class.- Parameters:
operationTime- the value for theoperationTimerecord componentoperationAcceleration- the value for theoperationAccelerationrecord componentoperationEndingVelocity- the value for theoperationEndingVelocityrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
operationTime
public org.wpilib.units.measure.Time operationTime()Returns the value of theoperationTimerecord component.- Returns:
- the value of the
operationTimerecord component
-
operationAcceleration
public org.wpilib.units.measure.LinearAcceleration operationAcceleration()Returns the value of theoperationAccelerationrecord component.- Returns:
- the value of the
operationAccelerationrecord component
-
operationEndingVelocity
public org.wpilib.units.measure.LinearVelocity operationEndingVelocity()Returns the value of theoperationEndingVelocityrecord component.- Returns:
- the value of the
operationEndingVelocityrecord component
-