| Modifier and Type | Class and Description |
|---|---|
| public static class | NumberDelimiterQuantityFormat.
A fluent Builder to easily create new instances of |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private static final NumberDelimiterQuantityFormat | LOCAL_INSTANCE
Holds the localized format instance. |
| private boolean | |
| private String | |
| private transient NumberFormat | |
| private transient Unit | |
| private static final long | |
| private static final NumberDelimiterQuantityFormat | SIMPLE_INSTANCE
Holds the default format instance (SimpleUnitFormat). |
| private transient UnitFormat |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static final NumberDelimiterQuantityFormat. | |
| public Appendable | format(Quantity<?>
the quantity to format. quantity, Appendable the appendable destination. dest)Implements abstract tech. Implements javax. Formats the specified quantity into an |
| protected StringBuffer | formatMixed(MixedQuantity<?>
the mixed quantity to format. comp, StringBuffer the appendable destination. dest)Implements abstract tech. Convenience method equivalent to |
| private static int | |
| public static NumberDelimiterQuantityFormat | Returns: NumberDelimiterQuantityFormat.getInstance(NumberFormat.getInstance(), UnitFormat.getInstance())the format behavior to apply. behavior)Returns an instance of |
| public static NumberDelimiterQuantityFormat | Returns: NumberDelimiterQuantityFormat.getInstance(NumberFormat.getInstance(), UnitFormat.getInstance())the format behavior to apply. behavior, int the number format style to apply. numberStyle)Returns an instance of |
| public static NumberDelimiterQuantityFormat | |
| public static NumberDelimiterQuantityFormat | Returns: the corresponding format.the number format. numberFormat, UnitFormat the unit format. unitFormat)Returns the quantity format using the specified number format and unit format (the number and unit are separated by one space). |
| public boolean | isLocaleSensitive()
Overrides default javax. Returns |
| public Quantity | parse(CharSequence
the csq, ParsePosition CharSequence to parse.the cursor holding the current parsing index. cursor)Implements abstract tech. Implements javax. Parses a portion of the specified |
| protected Quantity | parse(CharSequence
the csq, int CharSequence to parse.the current parsing index. index)Implements abstract tech. Parses a portion of the specified |
| public Quantity | parse(CharSequence
the csq)CharSequence to parse.Implements abstract tech. Implements javax. Parses a portion of the specified |
| public MixedQuantity | |
| protected MixedQuantity | |
| public MixedQuantity | |
| public String |
| delimiter | back to summary |
|---|---|
| private String delimiter | |
| LOCAL_INSTANCE | back to summary |
|---|---|
| private static final NumberDelimiterQuantityFormat LOCAL_INSTANCE Holds the localized format instance. | |
| localeSensitive | back to summary |
|---|---|
| private boolean localeSensitive | |
| mixDelimiter | back to summary |
|---|---|
| private String mixDelimiter | |
| numberFormat | back to summary |
|---|---|
| private transient NumberFormat numberFormat | |
| primaryUnit | back to summary |
|---|---|
| private transient Unit<Q extends Quantity<Q>> primaryUnit | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tech. | |
| SIMPLE_INSTANCE | back to summary |
|---|---|
| private static final NumberDelimiterQuantityFormat SIMPLE_INSTANCE Holds the default format instance (SimpleUnitFormat). | |
| unitFormat | back to summary |
|---|---|
| private transient UnitFormat unitFormat | |
| NumberDelimiterQuantityFormat | back to summary |
|---|---|
| private NumberDelimiterQuantityFormat() private constructor | |
| builder | back to summary |
|---|---|
| public static final NumberDelimiterQuantityFormat. Returns a new instance of
| |
| format | back to summary |
|---|---|
| public Appendable format(Quantity<?> quantity, Appendable dest) throws IOException Implements abstract tech. Implements javax. Doc from tech. Formats the specified quantity into an
| |
| formatMixed | back to summary |
|---|---|
| protected StringBuffer formatMixed(MixedQuantity<?> comp, StringBuffer dest) Implements abstract tech. Doc from tech. Convenience method equivalent to
| |
| getFractionDigitsCount | back to summary |
|---|---|
| private static int getFractionDigitsCount(double d) | |
| getInstance | back to summary |
|---|---|
| public static NumberDelimiterQuantityFormat getInstance(final FormatBehavior behavior) Returns an instance of
| |
| getInstance | back to summary |
|---|---|
| public static NumberDelimiterQuantityFormat getInstance(final FormatBehavior behavior, int numberStyle) Returns an instance of Implementation Note Note:
| |
| getInstance | back to summary |
|---|---|
| public static NumberDelimiterQuantityFormat getInstance() Returns the default format.
| |
| getInstance | back to summary |
|---|---|
| public static NumberDelimiterQuantityFormat getInstance(NumberFormat numberFormat, UnitFormat unitFormat) Returns the quantity format using the specified number format and unit format (the number and unit are separated by one space).
| |
| isLocaleSensitive | back to summary |
|---|---|
| public boolean isLocaleSensitive() Overrides default javax. Doc from javax. Returns
In environments that do not support a
| |
| parse | back to summary |
|---|---|
| public Quantity Implements abstract tech. Implements javax. Doc from tech. Parses a portion of the specified
| |
| parse | back to summary |
|---|---|
| protected Quantity Implements abstract tech. Doc from tech. Parses a portion of the specified
| |
| parse | back to summary |
|---|---|
| public Quantity Implements abstract tech. Implements javax. Doc from tech. Parses a portion of the specified
| |
| parseMixed | back to summary |
|---|---|
| public MixedQuantity | |
| parseMixed | back to summary |
|---|---|
| protected MixedQuantity | |
| parseMixed | back to summary |
|---|---|
| public MixedQuantity | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
NumberDelimiterQuantityFormat.
| Modifier and Type | Field and Description |
|---|---|
| private transient String | |
| private boolean | |
| private transient String | |
| private transient NumberFormat | |
| private transient Unit | |
| private transient UnitFormat |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public NumberDelimiterQuantityFormat | |
| public NumberDelimiterQuantityFormat. | Returns: thisNumberDelimiterQuantityFormat.Builderthe delimiter to use delimiter)Sets the delimiter between a |
| public NumberDelimiterQuantityFormat. | Returns: thisNumberDelimiterQuantityFormat.Builderthe flag, if the localeSensitive)NumberDelimiterQuantityFormat to be built will depend on a Locale to perform its tasks.Sets the |
| public NumberDelimiterQuantityFormat. | Returns: thisNumberDelimiterQuantityFormat.Builderthe numberFormat)NumberFormatSets the numberFormat parameter to the given |
| public NumberDelimiterQuantityFormat. | Returns: thisNumberDelimiterQuantityFormat.Builderthe primary primary)UnitSets the primary unit parameter for multiple |
| public NumberDelimiterQuantityFormat. | Returns: thisNumberDelimiterQuantityFormat.Builderthe delimiter to use radixPartsDelimiter)Sets the radix delimiter between multiple |
| public NumberDelimiterQuantityFormat. | Returns: thisNumberDelimiterQuantityFormat.Builderthe unitFormat)UnitFormatSets the unitFormat parameter to the given |
| delimiter | back to summary |
|---|---|
| private transient String delimiter | |
| localeSensitive | back to summary |
|---|---|
| private boolean localeSensitive | |
| mixedRadixDelimiter | back to summary |
|---|---|
| private transient String mixedRadixDelimiter | |
| numberFormat | back to summary |
|---|---|
| private transient NumberFormat numberFormat | |
| primaryUnit | back to summary |
|---|---|
| private transient Unit<Q extends Quantity<Q>> primaryUnit | |
| unitFormat | back to summary |
|---|---|
| private transient UnitFormat unitFormat | |
| Builder | back to summary |
|---|---|
| public Builder() | |
| build | back to summary |
|---|---|
| public NumberDelimiterQuantityFormat build() | |
| setDelimiter | back to summary |
|---|---|
| public NumberDelimiterQuantityFormat. Sets the delimiter between a
| |
| setLocaleSensitive | back to summary |
|---|---|
| public NumberDelimiterQuantityFormat. Sets the
| |
| setNumberFormat | back to summary |
|---|---|
| public NumberDelimiterQuantityFormat. Sets the numberFormat parameter to the given
| |
| setPrimaryUnit | back to summary |
|---|---|
| public NumberDelimiterQuantityFormat. Sets the primary unit parameter for multiple
| |
| setRadixPartsDelimiter | back to summary |
|---|---|
| public NumberDelimiterQuantityFormat. Sets the radix delimiter between multiple
| |
| setUnitFormat | back to summary |
|---|---|
| public NumberDelimiterQuantityFormat. Sets the unitFormat parameter to the given
| |