Interface StringHardwareProperty
- All Superinterfaces:
HardwareProperty
Represents an output value shown on some hardware (for example, the title of a track).
- Since:
- API version 10
-
Method Summary
Modifier and TypeMethodDescriptionGets the current value.intThe maximum number of characters that can be output or -1 if not specified and there is no limit.The value that was last sent to the hardware.voidonUpdateHardware(Consumer<String> sendValueConsumer) Specifies a callback that should be called with the value that needs to be sent to the hardware.voidsetMaxChars(int maxChars) voidSets the current value.voidsetValueSupplier(Supplier<String> supplier) Sets the current value from aSupplierthat supplies the latest value.
-
Method Details
-
currentValue
String currentValue()Gets the current value. This is the value that should be sent to the hardware to be displayed. -
lastSentValue
String 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
Sets the current value. -
setValueSupplier
Sets the current value from aSupplierthat supplies the latest value. -
getMaxChars
int getMaxChars()The maximum number of characters that can be output or -1 if not specified and there is no limit. -
setMaxChars
void setMaxChars(int maxChars)
-