Public Member Functions | |
Modal (Map specifiers, Format format) | |
String | format (Value value) |
Value | getPrefix () |
setPrefix (Value prefix) | |
Value | getSuffix () |
setSuffix (Value suffix) | |
reset () | |
Value | getCurrent () |
A modal unformatted variable. State is maintained to avoid output for unchanged values.
Constructs a modal variable.
specifiers | The format specifiers. |
format | The desired format (optional). |
The supported specifiers are:
prefix:
Specifies the prefix.suffix:
Specifies the suffix.force:
Specifies that the value must always be returned. Returns the corresponding string.
If the value is identical to the last value then the empty string is returned unless the force specifier has been set to true.
value | The value. This must be of type Number if a format has been specified. |
Value getCurrent | ( | ) |
Returns the last formatted value.
Value getPrefix | ( | ) |
Returns the prefix.
Value getSuffix | ( | ) |
Returns the suffix.
reset | ( | ) |
setPrefix | ( | Value | prefix | ) |
Sets the prefix.
setSuffix | ( | Value | suffix | ) |
Sets the suffix.