Package frc.robot.shotdata
Record Class ShotData.ShotParams
java.lang.Object
java.lang.Record
frc.robot.shotdata.ShotData.ShotParams
- Record Components:
pitch- the angle of the shotexitSpeed- the speed in meters per second that the ball is exiting the hoot.
- Enclosing class:
- ShotData
Encapsolates the computed shooter parameters for a single shot
-
Constructor Summary
ConstructorsConstructorDescriptionShotParams(Angle pitch, LinearVelocity exitSpeed) Creates an instance of aShotParamsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexitSpeedrecord component.final inthashCode()Returns a hash code value for this object.pitch()Returns the value of thepitchrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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 withObjects::equals(Object,Object). -
pitch
Returns the value of thepitchrecord component.- Returns:
- the value of the
pitchrecord component
-
exitSpeed
Returns the value of theexitSpeedrecord component.- Returns:
- the value of the
exitSpeedrecord component
-