Formatted

Represents a value that has already been formatted.

You can use this class to override how an already-formatted value is displayed.

Functions

Link copied to clipboard

Sets whether the abbreviation should be used instead of the full name.

Link copied to clipboard
open override fun asComponent(): Component

Builds a component representing the value and unit.

Link copied to clipboard

Sets whether the prefix should be automatically selected instead of using the default prefix (if set).

Link copied to clipboard

Sets the number of decimal places. This overrides significant figures if both are set.

Link copied to clipboard

Sets whether a value should always have decimal places. For example, if set to true, then the value 145 will be displayed as '145.0'

Link copied to clipboard

Sets what prefixes should not be used.

Link copied to clipboard

Overrides the default prefix (and adjusts the value shown accordingly).

Link copied to clipboard

Sets the number of significant figures. For example, if this is set to 3, then a value of 0.472894 will be shown as 0.473.

Link copied to clipboard

Overrides the style of the unit.