-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
413: Parsing of 1/mile is not possible
Task-Url: #413
- Loading branch information
Showing
2 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ | |
* @author <a href="mailto:[email protected]">Werner Keil</a> | ||
* @author <a href="mailto:[email protected]">Thodoris Bais</a> | ||
* | ||
* @version 2.8, $Date: 2023-06-05 $ | ||
* @version 2.9, $Date: 2024-10-12 $ | ||
* @since 2.0 | ||
*/ | ||
@SuppressWarnings({ "rawtypes", "unchecked" }) | ||
|
@@ -206,6 +206,25 @@ public static NumberDelimiterQuantityFormat getInstance(final FormatBehavior beh | |
} | ||
} | ||
|
||
/** | ||
* Returns an instance of {@link NumberDelimiterQuantityFormat} with a particular {@link FormatBehavior}, either locale-sensitive or locale-neutral, | ||
* and a desired number style.<br> | ||
* For example: <code>NumberDelimiterQuantityFormat.getInstance(LOCALE_NEUTRAL))</code> returns<br> | ||
* <code>new NumberDelimiterQuantityFormat.Builder().setNumberFormat(NumberFormat.getInstance(Locale.ROOT)).setUnitFormat(SimpleUnitFormat.getInstance()).build();</code> | ||
* @implNote | ||
* Note: <code>numberStyle</code> will be ignored before Java 17. Although the <code>COMPACT</code> {@linkplain NumberFormat} is already available from Java 12, Indriya supports major LTS versions like 8, 11 or 17. | ||
* | ||
* @param behavior | ||
* the format behavior to apply. | ||
* @param numberStyle | ||
* the number format style to apply. | ||
* @return <code>NumberDelimiterQuantityFormat.getInstance(NumberFormat.getInstance(), UnitFormat.getInstance())</code> | ||
* @since 2.9 | ||
*/ | ||
public static NumberDelimiterQuantityFormat getInstance(final FormatBehavior behavior, int numberStyle) { | ||
return getInstance(behavior); | ||
} | ||
|
||
/** | ||
* Returns a new instance of {@link Builder}. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters