ICU-21020 Document unchecked exception in various number formatter classes

This commit is contained in:
Victor Chang 2020-03-13 19:19:45 +00:00 committed by Shane F. Carr
parent 1a01c5edc1
commit 3f13312e8a
7 changed files with 18 additions and 0 deletions

View File

@ -34,6 +34,7 @@ public abstract class CurrencyPrecision extends Precision {
* @param currency
* The currency to associate with this rounding strategy.
* @return A Precision for chaining or passing to the NumberFormatter rounding() setter.
* @throws IllegalArgumentException for null Currency
* @stable ICU 60
* @see NumberFormatter
*/

View File

@ -34,6 +34,7 @@ public abstract class FractionPrecision extends Precision {
* @param minSignificantDigits
* The number of significant figures to guarantee.
* @return A Precision for chaining or passing to the NumberFormatter rounding() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than 1.
* @stable ICU 60
* @see NumberFormatter
*/
@ -62,6 +63,7 @@ public abstract class FractionPrecision extends Precision {
* @param maxSignificantDigits
* Round the number to no more than this number of significant figures.
* @return A Precision for chaining or passing to the NumberFormatter rounding() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than 1.
* @stable ICU 60
* @see NumberFormatter
*/

View File

@ -35,6 +35,7 @@ public class IntegerWidth {
* @param minInt
* The minimum number of places before the decimal separator.
* @return An IntegerWidth for chaining or passing to the NumberFormatter integerWidth() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than 0.
* @stable ICU 60
* @see NumberFormatter
*/
@ -59,6 +60,7 @@ public class IntegerWidth {
* The maximum number of places before the decimal separator. maxInt == -1 means no
* truncation.
* @return An IntegerWidth for passing to the NumberFormatter integerWidth() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than -1.
* @stable ICU 60
* @see NumberFormatter
*/

View File

@ -69,6 +69,7 @@ public class LocalizedNumberRangeFormatter extends NumberRangeFormatterSettings<
* @param second
* The second number in the range, usually to the right in LTR locales.
* @return A FormattedNumberRange object; call .toString() to get the string.
* @throw IllegalArgumentException if first or second is null
* @stable ICU 63
* @see NumberRangeFormatter
*/

View File

@ -88,6 +88,7 @@ public abstract class Precision implements Cloneable {
* The minimum and maximum number of numerals to display after the decimal separator
* (rounding if too long or padding with zeros if too short).
* @return A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than 0.
* @stable ICU 60
* @see NumberFormatter
*/
@ -113,6 +114,7 @@ public abstract class Precision implements Cloneable {
* The minimum number of numerals to display after the decimal separator (padding with
* zeros if necessary).
* @return A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than 0.
* @stable ICU 60
* @see NumberFormatter
*/
@ -135,6 +137,7 @@ public abstract class Precision implements Cloneable {
* The maximum number of numerals to display after the decimal mark (rounding if
* necessary).
* @return A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than 0.
* @stable ICU 60
* @see NumberFormatter
*/
@ -160,6 +163,7 @@ public abstract class Precision implements Cloneable {
* The maximum number of numerals to display after the decimal separator (rounding if
* necessary).
* @return A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than 0.
* @stable ICU 60
* @see NumberFormatter
*/
@ -187,6 +191,7 @@ public abstract class Precision implements Cloneable {
* The minimum and maximum number of significant digits to display (rounding if too long
* or padding with zeros if too short).
* @return A Precision for chaining or passing to the NumberFormatter precision() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than 1.
* @stable ICU 62
* @see NumberFormatter
*/
@ -211,6 +216,7 @@ public abstract class Precision implements Cloneable {
* @param minSignificantDigits
* The minimum number of significant digits to display (padding with zeros if too short).
* @return A Precision for chaining or passing to the NumberFormatter precision() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than 1.
* @stable ICU 62
* @see NumberFormatter
*/
@ -230,6 +236,7 @@ public abstract class Precision implements Cloneable {
* @param maxSignificantDigits
* The maximum number of significant digits to display (rounding if too long).
* @return A Precision for chaining or passing to the NumberFormatter precision() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than 1.
* @stable ICU 62
* @see NumberFormatter
*/
@ -252,6 +259,7 @@ public abstract class Precision implements Cloneable {
* @param maxSignificantDigits
* The maximum number of significant digits to display (rounding if necessary).
* @return A Precision for chaining or passing to the NumberFormatter precision() setter.
* @throws IllegalArgumentException if the input number is too big or smaller than 1.
* @stable ICU 62
* @see NumberFormatter
*/
@ -287,6 +295,7 @@ public abstract class Precision implements Cloneable {
* @param roundingIncrement
* The increment to which to round numbers.
* @return A Precision for chaining or passing to the NumberFormatter precision() setter.
* @throws IllegalArgumentException if the rounding increment is null or non-positive.
* @stable ICU 60
* @see NumberFormatter
*/
@ -314,6 +323,7 @@ public abstract class Precision implements Cloneable {
* Either STANDARD (for digital transactions) or CASH (for transactions where the rounding
* increment may be limited by the available denominations of cash or coins).
* @return A CurrencyPrecision for chaining or passing to the NumberFormatter precision() setter.
* @throws IllegalArgumentException if currencyUsage is null.
* @stable ICU 60
* @see NumberFormatter
*/

View File

@ -56,6 +56,7 @@ public class ScientificNotation extends Notation implements Cloneable {
* @param minExponentDigits
* The minimum number of digits to show in the exponent.
* @return A ScientificNotation, for chaining.
* @throws IllegalArgumentException if minExponentDigits is too big or smaller than 1
* @stable ICU 60
* @see NumberFormatter
*/

View File

@ -35,6 +35,7 @@ public interface FormattedValue extends CharSequence {
*
* @param appendable The Appendable to which to append the string output.
* @return The same Appendable, for chaining.
* @throws ICUUncheckedIOException if the Appendable throws IOException
* @draft ICU 64
* @provisional This API might change or be removed in a future release.
*/