Creates a new instance of Output with an optional set of options to override the default values.
The options to apply to the new instance.
The delimiter used to separate ranges.
The option that specifies how values are displayed.
The spacing used to separate the numerator and denominator of a fraction.
The spacing used to seperate a mixed number from the fraction.
The spacing used between the minimum and maximum values in a range.
The spacing used to separate a unit and the rate unit.
Whether or not a unit should be displayed for the minimum and maximum of a range when they have the same group.
An option used to restrict numbers from displaying large decimal numbers. When this value is set to -1 numbers are displayed fully. If the value is set to zero all numbers will be truncated to the whole version.
The option that specifies which units are chosen.
The spacing used between the value and the unit.
Returns an Output instance which matches the desired options. If no options are specified the reference to this instance is returned. If the options are already an instance of Output its returned. If options are specified a new instance is created with the options of this instance, and the given options applied with Output.set.
The options desired.
An instance of this class which matches the desired options.
Generates a unit string given the value, the current unit, and its group.
The value to generate a unit for.
The unit to potentially use.
The group of the unit.
The unit determined based on the options.
Determines whether the value should be displayed as a fraction.
The value to look at.
True if the value should be displayed as a fraction, otherwise false.
Determines whether the long unit should be displayed.
The group of the unit.
True if the short unit should be displayed, otherwise false.
Determines whether the value should be displayed as a mixed fraction. This assumes Output.isFraction was already checked and returned true.
The value to look at.
True if the value should be displayed as a mixed fraction, otherwise false.
Determines whether the value should be displayed as a number.
The value to look at.
True if the value should be displayed as a number, otherwise false.
Determines whether the short unit should be displayed.
The group of the unit.
True if the short unit should be displayed, otherwise false.
Converts the number to a string.
The number to convert.
The string representation of the input.
Converts the range to a string.
The string representation of the input.
Converts the list of ranges to a string. If a range is not valid it is skipped.
The list of ranges to convert.
The string representation of the input.
Overrides values in this instance with ones specified in input.
The values to override.
The reference to this instance.
Generates a full unit string including the rate unit if it exists.
The value to generate a unit for.
The units string representation.
Converts the value to the string optionally showing or hiding the unit.
The value to convert.
Whether or not the unit should be added to the string.
The string representation of the input.
Generated using TypeDoc
The class which converts Unitz objects to strings.