Package org.djunits.formatter
Class QuantityFormatContext
java.lang.Object
org.djunits.formatter.FormatContext
org.djunits.formatter.QuantityFormatContext
- All Implemented Interfaces:
Cloneable
QuantityFormatContext contains a number of settings for formatting a quantity. Note that this class and its fields are
package private. It is not the intention to use or extends the class, since the
QuantityFormat class can only deal
with the fields as expressed in this class, and not with other added fields.
Copyright (c) 2026-2026 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djunits.org. The DJUNITS project is distributed under a three-clause BSD-style license.
- Author:
- Alexander Verbraeck
-
Nested Class Summary
Nested classes/interfaces inherited from class org.djunits.formatter.FormatContext
FormatContext.FloatFormatMode -
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanAllow c, d, da and h prefixes?(package private) intmaximum exponent for the 10-power in scientific notation to use SI prefixes for (inclusive).(package private) intminimum exponent for the 10-power in scientific notation to use SI prefixes for (inclusive).(package private) booleanif true use automatic allocation of the unit to its closest SI prefix.Fields inherited from class org.djunits.formatter.FormatContext
decimals, displayUnit, formatMode, formatString, groupingSeparator, locale, maxSigDigits, printReference, referencePostfix, referencePrefix, sciThreshold, siDivisionSymbol, siDotSeparator, siPowerPostfix, siPowerPrefix, siUnits, textual, unitPostfix, unitPrefix, unitString, upperE, width -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
autoSiPrefix
boolean autoSiPrefixif true use automatic allocation of the unit to its closest SI prefix. E.g., turn 20400 m into "20.4 km". -
autoSiMinExponent
int autoSiMinExponentminimum exponent for the 10-power in scientific notation to use SI prefixes for (inclusive). -
autoSiMaxExponent
int autoSiMaxExponentmaximum exponent for the 10-power in scientific notation to use SI prefixes for (inclusive). -
allowExponents12
boolean allowExponents12Allow c, d, da and h prefixes?
-
-
Constructor Details
-
QuantityFormatContext
QuantityFormatContext()
-
-
Method Details
-
clone
- Overrides:
clonein classFormatContext
-