Public Member Functions | |
ReferenceVariable (Map specifiers, Format format) | |
String | format (Number value, Number reference) |
Value | getPrefix () |
setPrefix (Value prefix) | |
disable () | |
A referenced formatting variable. This object is used to avoid output of values if not required when values are identical to a specific reference value.
ReferenceVariable | ( | Map | specifiers, |
Format | format | ||
) |
Constructs a variable.
specifiers | The behavior specifiers. |
format | The instance of type Format used to format the output values. |
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 specified reference value. The reference value is optional. If not specified the value will be output.
value | The value. |
reference | The reference value. |
Value getPrefix | ( | ) |
Returns the prefix.
setPrefix | ( | Value | prefix | ) |
Sets the prefix.
prefix | The prefix string. |