< prev index next >

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

Print this page

        

*** 238,249 **** * This may result in loss of magnitude information and precision for * <code>BigInteger</code> and <code>BigDecimal</code> values. * @param number the number to format * @param toAppendTo the <code>StringBuffer</code> to which the formatted * text is to be appended ! * @param pos On input: an alignment field, if desired. ! * On output: the offsets of the alignment field. * @return the value passed in as <code>toAppendTo</code> * @exception IllegalArgumentException if <code>number</code> is * null or not an instance of <code>Number</code>. * @exception NullPointerException if <code>toAppendTo</code> or * <code>pos</code> is null --- 238,255 ---- * This may result in loss of magnitude information and precision for * <code>BigInteger</code> and <code>BigDecimal</code> values. * @param number the number to format * @param toAppendTo the <code>StringBuffer</code> to which the formatted * text is to be appended ! * @param pos keeps track on the position of the field within the ! * returned string. For example, for formatting a number ! * {@code 1234567.89} in {@code Locale.US} locale, ! * if the given {@code fieldPosition} is ! * {@link NumberFormat#INTEGER_FIELD}, the begin index ! * and end index of {@code fieldPosition} will be set ! * to 0 and 9, respectively for the output string ! * {@code 1,234,567.89}. * @return the value passed in as <code>toAppendTo</code> * @exception IllegalArgumentException if <code>number</code> is * null or not an instance of <code>Number</code>. * @exception NullPointerException if <code>toAppendTo</code> or * <code>pos</code> is null
*** 340,350 **** * Specialization of format. * * @param number the double number to format * @param toAppendTo the StringBuffer to which the formatted text is to be * appended ! * @param pos the field position * @return the formatted StringBuffer * @exception ArithmeticException if rounding is needed with rounding * mode being set to RoundingMode.UNNECESSARY * @see java.text.Format#format */ --- 346,363 ---- * Specialization of format. * * @param number the double number to format * @param toAppendTo the StringBuffer to which the formatted text is to be * appended ! * @param pos keeps track on the position of the field within the ! * returned string. For example, for formatting a number ! * {@code 1234567.89} in {@code Locale.US} locale, ! * if the given {@code fieldPosition} is ! * {@link NumberFormat#INTEGER_FIELD}, the begin index ! * and end index of {@code fieldPosition} will be set ! * to 0 and 9, respectively for the output string ! * {@code 1,234,567.89}. * @return the formatted StringBuffer * @exception ArithmeticException if rounding is needed with rounding * mode being set to RoundingMode.UNNECESSARY * @see java.text.Format#format */
*** 356,366 **** * Specialization of format. * * @param number the long number to format * @param toAppendTo the StringBuffer to which the formatted text is to be * appended ! * @param pos the field position * @return the formatted StringBuffer * @exception ArithmeticException if rounding is needed with rounding * mode being set to RoundingMode.UNNECESSARY * @see java.text.Format#format */ --- 369,386 ---- * Specialization of format. * * @param number the long number to format * @param toAppendTo the StringBuffer to which the formatted text is to be * appended ! * @param pos keeps track on the position of the field within the ! * returned string. For example, for formatting a number ! * {@code 123456789} in {@code Locale.US} locale, ! * if the given {@code fieldPosition} is ! * {@link NumberFormat#INTEGER_FIELD}, the begin index ! * and end index of {@code fieldPosition} will be set ! * to 0 and 11, respectively for the output string ! * {@code 123,456,789}. * @return the formatted StringBuffer * @exception ArithmeticException if rounding is needed with rounding * mode being set to RoundingMode.UNNECESSARY * @see java.text.Format#format */
< prev index next >