Public Member Functions | |
Variable (Map specifiers, Format format) | |
String | format (Number value) |
Value | getPrefix () |
setPrefix (Value prefix) | |
disable () | |
reset () | |
Value | getCurrent () |
A formatting variable. Instances of this class are used to format incoming values. State is maintained to avoid output for unchanged values.
Constructs a variable.
specifiers | The specifiers. |
format | The desired format. |
The supported specifiers are:
prefix:
Specifies a prefix to be prepended the formatted value.force:
Specifies that the value always must be output. disable | ( | ) |
Disable variable. When invoked format() always returns the empty string.
Returns the formatted string of the specified value. The empty string is returned if the value is identical to the last formatted value.
Value getCurrent | ( | ) |
Returns the last formatted value.
Value getPrefix | ( | ) |
Returns the prefix.
reset | ( | ) |
setPrefix | ( | Value | prefix | ) |
Sets the prefix.