Package edu.tufts.hrilab.teleop
Record Class TeleopGui.Twist
java.lang.Object
java.lang.Record
edu.tufts.hrilab.teleop.TeleopGui.Twist
- Enclosing class:
- TeleopGui
public static record TeleopGui.Twist(double linearXMps, double linearYMps, double angularRadps)
extends Record
Simple velocity container (holonomic): x forward, y left, yaw CCW.
-
Constructor Summary
ConstructorsConstructorDescriptionTwist(double linearXMps, double linearYMps, double angularRadps) Creates an instance of aTwistrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theangularRadpsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thelinearXMpsrecord component.doubleReturns the value of thelinearYMpsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Twist
public Twist(double linearXMps, double linearYMps, double angularRadps) Creates an instance of aTwistrecord class.- Parameters:
linearXMps- the value for thelinearXMpsrecord componentlinearYMps- the value for thelinearYMpsrecord componentangularRadps- the value for theangularRadpsrecord 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 with '=='. -
linearXMps
public double linearXMps()Returns the value of thelinearXMpsrecord component.- Returns:
- the value of the
linearXMpsrecord component
-
linearYMps
public double linearYMps()Returns the value of thelinearYMpsrecord component.- Returns:
- the value of the
linearYMpsrecord component
-
angularRadps
public double angularRadps()Returns the value of theangularRadpsrecord component.- Returns:
- the value of the
angularRadpsrecord component
-