Skip to content

Commit

Permalink
Updated JavaDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
keilw committed May 10, 2021
1 parent a9c5239 commit 1fa2d72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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" })
Expand Down Expand Up @@ -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.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ public static NumberDelimiterQuantityFormat getInstance(FormatBehavior behavior)
/**
* Returns an 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>
* <code>new NumberDelimiterQuantityFormat.Builder().setNumberFormat(NumberFormat.getCompactNumberInstance(Locale.ROOT, NumberFormat.Style.SHORT)).setUnitFormat(SimpleUnitFormat.getInstance()).build();</code>
*
* @param behavior
* the format behavior to apply.
Expand Down

0 comments on commit 1fa2d72

Please sign in to comment.