Record Class CANLightControllerOutputConfig

java.lang.Object
java.lang.Record
xbot.common.injection.electrical_contract.CANLightControllerOutputConfig
Record Components:
stripType - The type of LED strip
brightness - The brightness level (0.0 to 1.0)
ledStripLengths - An array specifying the length of each LED strip connected to the controller. Each LED strip is independently controllable as a "slot".

public record CANLightControllerOutputConfig(LEDStripType stripType, double brightness, int[] ledStripLengths) extends Record
Configuration data for CAN light controllers.
  • Field Details

    • Default

      public static CANLightControllerOutputConfig Default
      A default configuration with GRB strip type, full brightness, and two LED strips of lengths 8 and 30.
  • Constructor Details

    • CANLightControllerOutputConfig

      public CANLightControllerOutputConfig(LEDStripType stripType, double brightness, int[] ledStripLengths)
      Creates an instance of a CANLightControllerOutputConfig record class.
      Parameters:
      stripType - the value for the stripType record component
      brightness - the value for the brightness record component
      ledStripLengths - the value for the ledStripLengths record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • stripType

      public LEDStripType stripType()
      Returns the value of the stripType record component.
      Returns:
      the value of the stripType record component
    • brightness

      public double brightness()
      Returns the value of the brightness record component.
      Returns:
      the value of the brightness record component
    • ledStripLengths

      public int[] ledStripLengths()
      Returns the value of the ledStripLengths record component.
      Returns:
      the value of the ledStripLengths record component