Package frc.robot.shotdata
Record Class ShotData.ShotParameters
java.lang.Object
java.lang.Record
frc.robot.shotdata.ShotData.ShotParameters
- Enclosing class:
- ShotData
public static record ShotData.ShotParameters(double desiredSpeed, double hoodAngleDeg, double timeOfFlight, boolean isOkayToShoot)
extends Record
Parameters for a single instance of shooting.
-
Constructor Summary
ConstructorsConstructorDescriptionShotParameters(double desiredSpeed, double hoodAngleDeg, double timeOfFlight, boolean isOkayToShoot) Creates an instance of aShotParametersrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thedesiredSpeedrecord 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 thehoodAngleDegrecord component.booleanReturns the value of theisOkayToShootrecord component.doubleReturns the value of thetimeOfFlightrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ShotParameters
public ShotParameters(double desiredSpeed, double hoodAngleDeg, double timeOfFlight, boolean isOkayToShoot) Creates an instance of aShotParametersrecord class.- Parameters:
desiredSpeed- the value for thedesiredSpeedrecord componenthoodAngleDeg- the value for thehoodAngleDegrecord componenttimeOfFlight- the value for thetimeOfFlightrecord componentisOkayToShoot- the value for theisOkayToShootrecord 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 '=='. -
desiredSpeed
public double desiredSpeed()Returns the value of thedesiredSpeedrecord component.- Returns:
- the value of the
desiredSpeedrecord component
-
hoodAngleDeg
public double hoodAngleDeg()Returns the value of thehoodAngleDegrecord component.- Returns:
- the value of the
hoodAngleDegrecord component
-
timeOfFlight
public double timeOfFlight()Returns the value of thetimeOfFlightrecord component.- Returns:
- the value of the
timeOfFlightrecord component
-
isOkayToShoot
public boolean isOkayToShoot()Returns the value of theisOkayToShootrecord component.- Returns:
- the value of the
isOkayToShootrecord component
-