Package frc.robot.subsystems.shooter
Record Class Shooter.ShooterState
java.lang.Object
java.lang.Record
frc.robot.subsystems.shooter.Shooter.ShooterState
- Record Components:
flywheelSpeed- The target angular velocity of the shooter flywheels.hoodAngle- The target angle of the adjustable hood mechanism.
- Enclosing class:
- Shooter
public static record Shooter.ShooterState(AngularVelocity flywheelSpeed, Angle hoodAngle)
extends Record
Represents the desired physical state of the shooter subsystem.
This record encapsulates the target speed for the flywheels and the target angle for the adjustable hood to achieve a specific shot.
-
Constructor Summary
ConstructorsConstructorDescriptionShooterState(AngularVelocity flywheelSpeed, Angle hoodAngle) Creates an instance of aShooterStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theflywheelSpeedrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehoodAnglerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ShooterState
Creates an instance of aShooterStaterecord class.- Parameters:
flywheelSpeed- the value for theflywheelSpeedrecord componenthoodAngle- the value for thehoodAnglerecord 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 withObjects::equals(Object,Object). -
flywheelSpeed
Returns the value of theflywheelSpeedrecord component.- Returns:
- the value of the
flywheelSpeedrecord component
-
hoodAngle
Returns the value of thehoodAnglerecord component.- Returns:
- the value of the
hoodAnglerecord component
-