Public Member Functions | |
IncrementalVariable (Map specifiers, Format format) | |
String | format (Number value) |
Value | getPrefix () |
setPrefix (Value prefix) | |
disable () | |
reset () | |
Value | getCurrent () |
An incremental formatting variable. State is maintained to avoid output for zero increments.
IncrementalVariable | ( | Map | specifiers, |
Format | format | ||
) |
Constructs a variable.
The supported specifiers are:
prefix:
Specifies a prefix to be prepended the formatted value.force:
Specifies that the value always must be output.first:
Specifies the first value to be output. The default is 0. 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.