1 package org.djunits.formatter;
2
3 /**
4 * QuantityFormatContext contains a number of settings for formatting a quantity. Note that this class and its fields are
5 * package private. It is not the intention to use or extends the class, since the {@link QuantityFormat} class can only deal
6 * with the fields as expressed in this class, and not with other added fields.
7 * <p>
8 * Copyright (c) 2026-2026 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
9 * for project information <a href="https://djunits.org" target="_blank">https://djunits.org</a>. The DJUNITS project is
10 * distributed under a <a href="https://djunits.org/docs/license.html" target="_blank">three-clause BSD-style license</a>.
11 * @author Alexander Verbraeck
12 */
13 @SuppressWarnings("checkstyle:visibilitymodifier")
14 class QuantityFormatContext extends FormatContext implements Cloneable
15 {
16 // Quantity formatting from QuantityFormat, contains default values
17
18 /** Use closest SI prefix. E.g., turn 20400 m into "20.4 km". */
19 boolean scaleSiPrefixes = false;
20
21 /** minimum 10th power to use SI prefixes for. */
22 int minimumPrefixPower = -30;
23
24 /** maximum 10th power to use SI prefixes for. */
25 int maximumPrefixPower = 32;
26
27 @Override
28 protected QuantityFormatContext clone()
29 {
30 return (QuantityFormatContext) super.clone();
31 }
32
33 }