Package frc.robot.math
Record Class ShootOnMove.MovingShot
java.lang.Object
java.lang.Record
frc.robot.math.ShootOnMove.MovingShot
- Enclosing class:
- ShootOnMove
public static record ShootOnMove.MovingShot(Rotation2d turretAngleFieldRelative, Angle pitch, LinearVelocity exitSpeed, boolean feasible)
extends Record
Records moving shot
-
Constructor Summary
ConstructorsConstructorDescriptionMovingShot(Rotation2d turretAngleFieldRelative, Angle pitch, LinearVelocity exitSpeed, boolean feasible) Creates an instance of aMovingShotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexitSpeedrecord component.booleanfeasible()Returns the value of thefeasiblerecord 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.Returns the value of theturretAngleFieldRelativerecord component.
-
Constructor Details
-
MovingShot
public MovingShot(Rotation2d turretAngleFieldRelative, Angle pitch, LinearVelocity exitSpeed, boolean feasible) Creates an instance of aMovingShotrecord class.- Parameters:
turretAngleFieldRelative- the value for theturretAngleFieldRelativerecord componentpitch- the value for thepitchrecord componentexitSpeed- the value for theexitSpeedrecord componentfeasible- the value for thefeasiblerecord 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 '=='. -
turretAngleFieldRelative
Returns the value of theturretAngleFieldRelativerecord component.- Returns:
- the value of the
turretAngleFieldRelativerecord component
-
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
-
feasible
public boolean feasible()Returns the value of thefeasiblerecord component.- Returns:
- the value of the
feasiblerecord component
-