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, Rotation2d driveAngle, double driveAngularVelocity, double hoodAngle, double hoodVelocity, double flywheelSpeed, double distance, double distanceNoLookahead, double timeOfFlight)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionShootingParameters(boolean isValid, Rotation2d driveAngle, double driveAngularVelocity, double hoodAngle, double hoodVelocity, double flywheelSpeed, double distance, double distanceNoLookahead, double timeOfFlight) Creates an instance of aShootingParametersrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubledistance()Returns the value of thedistancerecord component.doubleReturns the value of thedistanceNoLookaheadrecord component.Returns the value of thedriveAnglerecord component.doubleReturns the value of thedriveAngularVelocityrecord component.final 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.doubleReturns the value of thehoodVelocityrecord component.booleanisValid()Returns the value of theisValidrecord component.doubleReturns the value of thetimeOfFlightrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ShootingParameters
public ShootingParameters(boolean isValid, Rotation2d driveAngle, double driveAngularVelocity, double hoodAngle, double hoodVelocity, double flywheelSpeed, double distance, double distanceNoLookahead, double timeOfFlight) Creates an instance of aShootingParametersrecord class.- Parameters:
isValid- the value for theisValidrecord componentdriveAngle- the value for thedriveAnglerecord componentdriveAngularVelocity- the value for thedriveAngularVelocityrecord componenthoodAngle- the value for thehoodAnglerecord componenthoodVelocity- the value for thehoodVelocityrecord componentflywheelSpeed- the value for theflywheelSpeedrecord componentdistance- the value for thedistancerecord componentdistanceNoLookahead- the value for thedistanceNoLookaheadrecord componenttimeOfFlight- the value for thetimeOfFlightrecord 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
-
driveAngle
Returns the value of thedriveAnglerecord component.- Returns:
- the value of the
driveAnglerecord component
-
driveAngularVelocity
public double driveAngularVelocity()Returns the value of thedriveAngularVelocityrecord component.- Returns:
- the value of the
driveAngularVelocityrecord component
-
hoodAngle
public double hoodAngle()Returns the value of thehoodAnglerecord component.- Returns:
- the value of the
hoodAnglerecord component
-
hoodVelocity
public double hoodVelocity()Returns the value of thehoodVelocityrecord component.- Returns:
- the value of the
hoodVelocityrecord component
-
flywheelSpeed
public double flywheelSpeed()Returns the value of theflywheelSpeedrecord component.- Returns:
- the value of the
flywheelSpeedrecord component
-
distance
public double distance()Returns the value of thedistancerecord component.- Returns:
- the value of the
distancerecord component
-
distanceNoLookahead
public double distanceNoLookahead()Returns the value of thedistanceNoLookaheadrecord component.- Returns:
- the value of the
distanceNoLookaheadrecord component
-
timeOfFlight
public double timeOfFlight()Returns the value of thetimeOfFlightrecord component.- Returns:
- the value of the
timeOfFlightrecord component
-