Package frc.rebuilt
Record Class ShiftHelpers.ShiftInfo
java.lang.Object
java.lang.Record
frc.rebuilt.ShiftHelpers.ShiftInfo
- Enclosing class:
- ShiftHelpers
public static record ShiftHelpers.ShiftInfo(ShiftHelpers.ShiftEnum currentShift, double elapsedTime, double remainingTime, boolean active)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionShiftInfo(ShiftHelpers.ShiftEnum currentShift, double elapsedTime, double remainingTime, boolean active) Creates an instance of aShiftInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.Returns the value of thecurrentShiftrecord component.doubleReturns the value of theelapsedTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theremainingTimerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ShiftInfo
public ShiftInfo(ShiftHelpers.ShiftEnum currentShift, double elapsedTime, double remainingTime, boolean active) Creates an instance of aShiftInforecord class.- Parameters:
currentShift- the value for thecurrentShiftrecord componentelapsedTime- the value for theelapsedTimerecord componentremainingTime- the value for theremainingTimerecord componentactive- the value for theactiverecord 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 '=='. -
currentShift
Returns the value of thecurrentShiftrecord component.- Returns:
- the value of the
currentShiftrecord component
-
elapsedTime
public double elapsedTime()Returns the value of theelapsedTimerecord component.- Returns:
- the value of the
elapsedTimerecord component
-
remainingTime
public double remainingTime()Returns the value of theremainingTimerecord component.- Returns:
- the value of the
remainingTimerecord component
-
active
public boolean active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-