Package frc.robot.systems.drive
Record Class DriveConstants.ModuleHardwareConfig
java.lang.Object
java.lang.Record
frc.robot.systems.drive.DriveConstants.ModuleHardwareConfig
- Enclosing class:
- DriveConstants
public static record DriveConstants.ModuleHardwareConfig(int driveID, int azimuthID, int encoderID, double offset)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionModuleHardwareConfig(int driveID, int azimuthID, int encoderID, double offset) Creates an instance of aModuleHardwareConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theazimuthIDrecord component.intdriveID()Returns the value of thedriveIDrecord component.intReturns the value of theencoderIDrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleoffset()Returns the value of theoffsetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModuleHardwareConfig
public ModuleHardwareConfig(int driveID, int azimuthID, int encoderID, double offset) Creates an instance of aModuleHardwareConfigrecord class.- Parameters:
driveID- the value for thedriveIDrecord componentazimuthID- the value for theazimuthIDrecord componentencoderID- the value for theencoderIDrecord componentoffset- the value for theoffsetrecord 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 '=='. -
driveID
public int driveID()Returns the value of thedriveIDrecord component.- Returns:
- the value of the
driveIDrecord component
-
azimuthID
public int azimuthID()Returns the value of theazimuthIDrecord component.- Returns:
- the value of the
azimuthIDrecord component
-
encoderID
public int encoderID()Returns the value of theencoderIDrecord component.- Returns:
- the value of the
encoderIDrecord component
-
offset
public double offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-