Interface BooleanHardwareProperty

All Superinterfaces:
HardwareProperty

public interface BooleanHardwareProperty extends HardwareProperty
Represents an output value shown on some hardware (for example, if an LED is on or off).
Since:
API version 10
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Gets the current value.
    boolean
    The value that was last sent to the hardware.
    void
    onUpdateHardware(Consumer<Boolean> sendValueConsumer)
    Specifies a callback that should be called with the value that needs to be sent to the hardware.
    void
    setValue(boolean value)
    Sets the current value.
    void
    Sets the current value from a BooleanSupplier that supplies the latest value.
  • Method Details

    • currentValue

      boolean currentValue()
      Gets the current value. This is the value that should be sent to the hardware to be displayed.
    • lastSentValue

      boolean lastSentValue()
      The value that was last sent to the hardware.
    • onUpdateHardware

      void onUpdateHardware(Consumer<Boolean> sendValueConsumer)
      Specifies a callback that should be called with the value that needs to be sent to the hardware. This callback is called as a result of calling the HardwareSurface.updateHardware() method (typically from the flush method).
    • setValue

      void setValue(boolean value)
      Sets the current value.
    • setValueSupplier

      void setValueSupplier(BooleanSupplier supplier)
      Sets the current value from a BooleanSupplier that supplies the latest value.