Package xbot.common.subsystems.drive
Record Class CalculatorNode
java.lang.Object
java.lang.Record
xbot.common.subsystems.drive.CalculatorNode
public record CalculatorNode(Time operationTime, LinearAcceleration operationAcceleration, 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(Time operationTime, LinearAcceleration operationAcceleration, 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.Returns the value of theoperationAccelerationrecord component.Returns the value of theoperationEndingVelocityrecord component.Returns 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(Time operationTime, LinearAcceleration operationAcceleration, 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
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. All components in this record class are compared withObjects::equals(Object,Object). -
operationTime
Returns the value of theoperationTimerecord component.- Returns:
- the value of the
operationTimerecord component
-
operationAcceleration
Returns the value of theoperationAccelerationrecord component.- Returns:
- the value of the
operationAccelerationrecord component
-
operationEndingVelocity
Returns the value of theoperationEndingVelocityrecord component.- Returns:
- the value of the
operationEndingVelocityrecord component
-