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 aCalculatorNode
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theoperationAcceleration
record component.Returns the value of theoperationEndingVelocity
record component.Returns the value of theoperationTime
record component.final String
toString()
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 aCalculatorNode
record class.- Parameters:
operationTime
- the value for theoperationTime
record componentoperationAcceleration
- the value for theoperationAcceleration
record componentoperationEndingVelocity
- the value for theoperationEndingVelocity
record 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 theoperationTime
record component.- Returns:
- the value of the
operationTime
record component
-
operationAcceleration
Returns the value of theoperationAcceleration
record component.- Returns:
- the value of the
operationAcceleration
record component
-
operationEndingVelocity
Returns the value of theoperationEndingVelocity
record component.- Returns:
- the value of the
operationEndingVelocity
record component
-