< prev index next >

src/java.base/share/classes/java/text/ChoiceFormat.java

Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea

@@ -172,11 +172,11 @@
     private static final long serialVersionUID = 1795184449645032964L;
 
     /**
      * Sets the pattern.
      * @param newPattern See the class description.
-     * @exception NullPointerException if {@code newPattern}
+     * @throws    NullPointerException if {@code newPattern}
      *            is {@code null}
      */
     public void applyPattern(String newPattern) {
         StringBuffer[] segments = new StringBuffer[2];
         for (int i = 0; i < segments.length; ++i) {

@@ -311,11 +311,11 @@
 
     /**
      * Constructs with limits and corresponding formats based on the pattern.
      *
      * @param newPattern the new pattern string
-     * @exception NullPointerException if {@code newPattern} is
+     * @throws    NullPointerException if {@code newPattern} is
      *            {@code null}
      * @see #applyPattern
      */
     public ChoiceFormat(String newPattern)  {
         applyPattern(newPattern);

@@ -324,11 +324,11 @@
     /**
      * Constructs with the limits and the corresponding formats.
      *
      * @param limits limits in ascending order
      * @param formats corresponding format strings
-     * @exception NullPointerException if {@code limits} or {@code formats}
+     * @throws    NullPointerException if {@code limits} or {@code formats}
      *            is {@code null}
      * @see #setChoices
      */
     public ChoiceFormat(double[] limits, String[] formats) {
         setChoices(limits, formats);

@@ -345,11 +345,11 @@
      * @param formats are the formats you want to use for each limit.
      * They can be either Format objects or Strings.
      * When formatting with object Y,
      * if the object is a NumberFormat, then ((NumberFormat) Y).format(X)
      * is called. Otherwise Y.toString() is called.
-     * @exception NullPointerException if {@code limits} or
+     * @throws    NullPointerException if {@code limits} or
      *            {@code formats} is {@code null}
      */
     public void setChoices(double[] limits, String formats[]) {
         if (limits.length != formats.length) {
             throw new IllegalArgumentException(

@@ -394,11 +394,11 @@
     /**
      * Returns pattern with formatted double.
      * @param number number to be formatted and substituted.
      * @param toAppendTo where text is appended.
      * @param status ignore no useful status is returned.
-     * @exception NullPointerException if {@code toAppendTo}
+     * @throws    NullPointerException if {@code toAppendTo}
      *            is {@code null}
      */
    public StringBuffer format(double number, StringBuffer toAppendTo,
                                FieldPosition status) {
         // find the number

@@ -424,11 +424,11 @@
      * occurred, status.index is set to the first unparsed character
      * in the source text.  On exit, if an error did occur,
      * status.index is unchanged and status.errorIndex is set to the
      * first index of the character that caused the parse to fail.
      * @return A Number representing the value of the number parsed.
-     * @exception NullPointerException if {@code status} is {@code null}
+     * @throws    NullPointerException if {@code status} is {@code null}
      *            or if {@code text} is {@code null} and the list of
      *            choice strings is not empty.
      */
     public Number parse(String text, ParsePosition status) {
         // find the best number (defined as the one with the longest parse)
< prev index next >