Package com.revrobotics.encoder
Record Class DetachedEncoder.FirmwareVersion
java.lang.Object
java.lang.Record
com.revrobotics.encoder.DetachedEncoder.FirmwareVersion
- Enclosing class:
- DetachedEncoder
public static record DetachedEncoder.FirmwareVersion(int major, int minor, int fix, int prerelease, int hardwareMajor, int hardwareMinor)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionFirmwareVersion(int major, int minor, int fix, int prerelease, int hardwareMajor, int hardwareMinor) Creates an instance of aFirmwareVersionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intfix()Returns the value of thefixrecord component.intReturns the value of thehardwareMajorrecord component.intReturns the value of thehardwareMinorrecord component.final inthashCode()Returns a hash code value for this object.intmajor()Returns the value of themajorrecord component.intminor()Returns the value of theminorrecord component.intReturns the value of theprereleaserecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FirmwareVersion
public FirmwareVersion(int major, int minor, int fix, int prerelease, int hardwareMajor, int hardwareMinor) Creates an instance of aFirmwareVersionrecord class.- Parameters:
major- the value for themajorrecord componentminor- the value for theminorrecord componentfix- the value for thefixrecord componentprerelease- the value for theprereleaserecord componenthardwareMajor- the value for thehardwareMajorrecord componenthardwareMinor- the value for thehardwareMinorrecord 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 '=='. -
major
public int major()Returns the value of themajorrecord component.- Returns:
- the value of the
majorrecord component
-
minor
public int minor()Returns the value of theminorrecord component.- Returns:
- the value of the
minorrecord component
-
fix
public int fix()Returns the value of thefixrecord component.- Returns:
- the value of the
fixrecord component
-
prerelease
public int prerelease()Returns the value of theprereleaserecord component.- Returns:
- the value of the
prereleaserecord component
-
hardwareMajor
public int hardwareMajor()Returns the value of thehardwareMajorrecord component.- Returns:
- the value of the
hardwareMajorrecord component
-
hardwareMinor
public int hardwareMinor()Returns the value of thehardwareMinorrecord component.- Returns:
- the value of the
hardwareMinorrecord component
-