Interface IntegerHardwareProperty
- All Superinterfaces:
HardwareProperty
Represents an output value shown on some hardware.
- Since:
- API version 10
-
Method Summary
Modifier and TypeMethodDescriptionintGets the current value.intThe value that was last sent to the hardware.voidonUpdateHardware(IntConsumer sendValueConsumer) Specifies a callback that should be called with the value that needs to be sent to the hardware.voidsetValue(int value) Sets the current value.voidsetValueSupplier(IntSupplier supplier) Sets the current value from aBooleanSupplierthat supplies the latest value.
-
Method Details
-
currentValue
int currentValue()Gets the current value. This is the value that should be sent to the hardware to be displayed. -
lastSentValue
int lastSentValue()The value that was last sent to the hardware. -
onUpdateHardware
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 theHardwareSurface.updateHardware()method (typically from the flush method). -
setValue
void setValue(int value) Sets the current value. -
setValueSupplier
Sets the current value from aBooleanSupplierthat supplies the latest value.
-