-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
5 additions
and
4 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 |
---|---|---|
|
@@ -56,7 +56,7 @@ | |
* @author <a href="mailto:[email protected]">Werner Keil</a> | ||
* @author <a href="mailto:[email protected]">Thodoris Bais</a> | ||
* | ||
* @version 2.5, $Date: 2021-05-09 $ | ||
* @version 2.6, $Date: 2021-05-10 $ | ||
* @since 2.0 | ||
*/ | ||
@SuppressWarnings({ "rawtypes", "unchecked" }) | ||
|
@@ -238,15 +238,17 @@ public static NumberDelimiterQuantityFormat getInstance(NumberFormat numberForma | |
} | ||
|
||
/** | ||
* Returns an instance of {@link NumberDelimiterQuantityFormat} with a particular {@link FormatBehavior}, either locale-sensitive or locale-neutral. | ||
* Returns a compact instance of {@link NumberDelimiterQuantityFormat} with a particular {@link FormatBehavior}, either locale-sensitive or locale-neutral. | ||
* 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 This is a <b>stub</b> that won't work prior to Java 12 because the <type>CompactNumberFormat</type> used by it does not exist before Java 12. | ||
* @param behavior | ||
* the format behavior to apply. | ||
* @return <code>NumberDelimiterQuantityFormat.getInstance(NumberFormat.getInstance(), UnitFormat.getInstance())</code> | ||
* @since 2.5 | ||
* @throws UnsupportedOperationException prior to Java 12 | ||
*/ | ||
public static NumberDelimiterQuantityFormat getCompactInstance(FormatBehavior behavior) { | ||
throw new UnsupportedOperationException("This method requires Java 12."); | ||
|
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