src/java.base/share/classes/java/text/MessageFormat.java
changeset 48026 89deac44e515
parent 47216 71c04702a3d5
child 48072 7648ccddd7a6
equal deleted inserted replaced
48025:6bc1de3b8c59 48026:89deac44e515
   818      * <code>Field.ARGUMENT</code>, the location of the first formatted
   818      * <code>Field.ARGUMENT</code>, the location of the first formatted
   819      * string will be returned.
   819      * string will be returned.
   820      *
   820      *
   821      * @param arguments an array of objects to be formatted and substituted.
   821      * @param arguments an array of objects to be formatted and substituted.
   822      * @param result where text is appended.
   822      * @param result where text is appended.
   823      * @param pos On input: an alignment field, if desired.
   823      * @param pos keeps track on the position of the first replaced argument
   824      *            On output: the offsets of the alignment field.
   824                   in the output string.
   825      * @return the string buffer passed in as {@code result}, with formatted
   825      * @return the string buffer passed in as {@code result}, with formatted
   826      * text appended
   826      * text appended
   827      * @exception IllegalArgumentException if an argument in the
   827      * @exception IllegalArgumentException if an argument in the
   828      *            <code>arguments</code> array is not of the type
   828      *            <code>arguments</code> array is not of the type
   829      *            expected by the format element(s) that use it.
   829      *            expected by the format element(s) that use it.
   866      *     <code>{@link #format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) format}((Object[]) arguments, result, pos)</code>
   866      *     <code>{@link #format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) format}((Object[]) arguments, result, pos)</code>
   867      * </blockquote>
   867      * </blockquote>
   868      *
   868      *
   869      * @param arguments an array of objects to be formatted and substituted.
   869      * @param arguments an array of objects to be formatted and substituted.
   870      * @param result where text is appended.
   870      * @param result where text is appended.
   871      * @param pos On input: an alignment field, if desired.
   871      * @param pos keeps track on the position of the first replaced argument
   872      *            On output: the offsets of the alignment field.
   872      *            in the output string.
   873      * @exception IllegalArgumentException if an argument in the
   873      * @exception IllegalArgumentException if an argument in the
   874      *            <code>arguments</code> array is not of the type
   874      *            <code>arguments</code> array is not of the type
   875      *            expected by the format element(s) that use it.
   875      *            expected by the format element(s) that use it.
   876      * @exception NullPointerException if {@code result} is {@code null}
   876      * @exception NullPointerException if {@code result} is {@code null}
   877      */
   877      */
  1237      * @serial
  1237      * @serial
  1238      */
  1238      */
  1239     private int maxOffset = -1;
  1239     private int maxOffset = -1;
  1240 
  1240 
  1241     /**
  1241     /**
  1242      * Internal routine used by format. If <code>characterIterators</code> is
  1242      * Internal routine used by format. If {@code characterIterators} is
  1243      * non-null, AttributedCharacterIterator will be created from the
  1243      * {@code non-null}, AttributedCharacterIterator will be created from the
  1244      * subformats as necessary. If <code>characterIterators</code> is null
  1244      * subformats as necessary. If {@code characterIterators} is {@code null}
  1245      * and <code>fp</code> is non-null and identifies
  1245      * and {@code fp} is {@code non-null} and identifies
  1246      * <code>Field.MESSAGE_ARGUMENT</code>, the location of
  1246      * {@code Field.ARGUMENT} as the field attribute, the location of
  1247      * the first replaced argument will be set in it.
  1247      * the first replaced argument will be set in it.
  1248      *
  1248      *
  1249      * @exception IllegalArgumentException if an argument in the
  1249      * @exception IllegalArgumentException if an argument in the
  1250      *            <code>arguments</code> array is not of the type
  1250      *            <code>arguments</code> array is not of the type
  1251      *            expected by the format element(s) that use it.
  1251      *            expected by the format element(s) that use it.