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(boolean isValid, edu.wpi.first.math.geometry.Rotation2d turretAngle, double turretAngularVelocityRotPerSec, double flywheelSpeed)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionShootingParameters(boolean isValid, edu.wpi.first.math.geometry.Rotation2d turretAngle, double turretAngularVelocityRotPerSec, 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.booleanisValid()Returns the value of theisValidrecord component.final StringtoString()Returns a string representation of this record class.edu.wpi.first.math.geometry.Rotation2dReturns the value of theturretAnglerecord component.doubleReturns the value of theturretAngularVelocityRotPerSecrecord component.
-
Constructor Details
-
ShootingParameters
public ShootingParameters(boolean isValid, edu.wpi.first.math.geometry.Rotation2d turretAngle, double turretAngularVelocityRotPerSec, double flywheelSpeed) Creates an instance of aShootingParametersrecord class.- Parameters:
isValid- the value for theisValidrecord componentturretAngle- the value for theturretAnglerecord componentturretAngularVelocityRotPerSec- the value for theturretAngularVelocityRotPerSecrecord 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 '=='. -
isValid
public boolean isValid()Returns the value of theisValidrecord component.- Returns:
- the value of the
isValidrecord component
-
turretAngle
public edu.wpi.first.math.geometry.Rotation2d turretAngle()Returns the value of theturretAnglerecord component.- Returns:
- the value of the
turretAnglerecord component
-
turretAngularVelocityRotPerSec
public double turretAngularVelocityRotPerSec()Returns the value of theturretAngularVelocityRotPerSecrecord component.- Returns:
- the value of the
turretAngularVelocityRotPerSecrecord component
-
flywheelSpeed
public double flywheelSpeed()Returns the value of theflywheelSpeedrecord component.- Returns:
- the value of the
flywheelSpeedrecord component
-