Package frc.rebuilt
Record Class ShotCalculator.ShootingParameters
java.lang.Object
java.lang.Record
frc.rebuilt.ShotCalculator.ShootingParameters
- Enclosing class:
- ShotCalculator
public static record ShotCalculator.ShootingParameters(edu.wpi.first.math.geometry.Rotation2d turretAngle, double hoodAngle, double flywheelSpeed)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionShootingParameters(edu.wpi.first.math.geometry.Rotation2d turretAngle, double hoodAngle, double flywheelSpeed) Creates an instance of aShootingParametersrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theflywheelSpeedrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thehoodAnglerecord component.final StringtoString()Returns a string representation of this record class.edu.wpi.first.math.geometry.Rotation2dReturns the value of theturretAnglerecord component.
-
Constructor Details
-
ShootingParameters
public ShootingParameters(edu.wpi.first.math.geometry.Rotation2d turretAngle, double hoodAngle, double flywheelSpeed) Creates an instance of aShootingParametersrecord class.- Parameters:
turretAngle- the value for theturretAnglerecord componenthoodAngle- the value for thehoodAnglerecord componentflywheelSpeed- the value for theflywheelSpeedrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
turretAngle
public edu.wpi.first.math.geometry.Rotation2d turretAngle()Returns the value of theturretAnglerecord component.- Returns:
- the value of the
turretAnglerecord component
-
hoodAngle
public double hoodAngle()Returns the value of thehoodAnglerecord component.- Returns:
- the value of the
hoodAnglerecord component
-
flywheelSpeed
public double flywheelSpeed()Returns the value of theflywheelSpeedrecord component.- Returns:
- the value of the
flywheelSpeedrecord component
-