Record Class SwerveParser.SwerveDriveDevices<D extends SwerveDrive>
java.lang.Object
java.lang.Record
swervelib.core.parser.SwerveParser.SwerveDriveDevices<D>
- Type Parameters:
D-SwerveDrivetype of the command framework.- Record Components:
swerveDrive-SwerveDrivebuilt from these devices.gyro- Raw gyro device (e.g. aPigeon2instance), ornullif the configured gyro type is"custom"(the caller is expected to supply/own their own gyro in that case).modules- Raw devices for each module, in the same order asSwerveDriveJson.modules.
- Enclosing class:
SwerveParser
public static record SwerveParser.SwerveDriveDevices<D extends SwerveDrive>(D extends SwerveDrive swerveDrive, Object gyro, SwerveParser.SwerveModuleDevices[] modules)
extends Record
Raw hardware devices created by a command-framework specific
SwerveParser#createSwerveDriveDevices,
alongside the SwerveDrive it built.-
Constructor Summary
ConstructorsConstructorDescriptionSwerveDriveDevices(D swerveDrive, Object gyro, SwerveParser.SwerveModuleDevices[] modules) Creates an instance of aSwerveDriveDevicesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.gyro()Returns the value of thegyrorecord component.final inthashCode()Returns a hash code value for this object.modules()Returns the value of themodulesrecord component.Returns the value of theswerveDriverecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SwerveDriveDevices
Creates an instance of aSwerveDriveDevicesrecord class.- Parameters:
swerveDrive- the value for theswerveDriverecord componentgyro- the value for thegyrorecord componentmodules- the value for themodulesrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
swerveDrive
Returns the value of theswerveDriverecord component.- Returns:
- the value of the
swerveDriverecord component
-
gyro
-
modules
-