jdk/src/java.base/share/classes/java/text/MessageFormat.java
changeset 45124 144479e89cdb
parent 44844 b2b4d98404ba
child 45434 4582657c7260
equal deleted inserted replaced
45123:e0a225dbc346 45124:144479e89cdb
   144  * a {@code Format} instance for the format element. The following
   144  * a {@code Format} instance for the format element. The following
   145  * table shows how the values map to {@code Format} instances. Combinations not
   145  * table shows how the values map to {@code Format} instances. Combinations not
   146  * shown in the table are illegal. A <i>SubformatPattern</i> must
   146  * shown in the table are illegal. A <i>SubformatPattern</i> must
   147  * be a valid pattern string for the {@code Format} subclass used.
   147  * be a valid pattern string for the {@code Format} subclass used.
   148  *
   148  *
   149  * <table border=1 summary="Shows how FormatType and FormatStyle values map to Format instances">
   149  * <table class="plain">
       
   150  * <caption style="display:none">Shows how FormatType and FormatStyle values map to Format instances</caption>
       
   151  * <thead>
   150  *    <tr>
   152  *    <tr>
   151  *       <th id="ft" class="TableHeadingColor">FormatType
   153  *       <th id="ft" class="TableHeadingColor">FormatType
   152  *       <th id="fs" class="TableHeadingColor">FormatStyle
   154  *       <th id="fs" class="TableHeadingColor">FormatStyle
   153  *       <th id="sc" class="TableHeadingColor">Subformat Created
   155  *       <th id="sc" class="TableHeadingColor">Subformat Created
       
   156  * </thead>
       
   157  * <tbody>
   154  *    <tr>
   158  *    <tr>
   155  *       <td headers="ft"><i>(none)</i>
   159  *       <td headers="ft"><i>(none)</i>
   156  *       <td headers="fs"><i>(none)</i>
   160  *       <td headers="fs"><i>(none)</i>
   157  *       <td headers="sc"><code>null</code>
   161  *       <td headers="sc"><code>null</code>
   158  *    <tr>
   162  *    <tr>
   211  *       <td headers="sc">{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
   215  *       <td headers="sc">{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
   212  *    <tr>
   216  *    <tr>
   213  *       <td headers="ft"><code>choice</code>
   217  *       <td headers="ft"><code>choice</code>
   214  *       <td headers="fs"><i>SubformatPattern</i>
   218  *       <td headers="fs"><i>SubformatPattern</i>
   215  *       <td headers="sc">{@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)}
   219  *       <td headers="sc">{@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)}
       
   220  * </tbody>
   216  * </table>
   221  * </table>
   217  *
   222  *
   218  * <h4>Usage Information</h4>
   223  * <h4>Usage Information</h4>
   219  *
   224  *
   220  * <p>
   225  * <p>
   764      * <code>arguments</code> element at the format element's argument index
   769      * <code>arguments</code> element at the format element's argument index
   765      * as indicated by the first matching line of the following table. An
   770      * as indicated by the first matching line of the following table. An
   766      * argument is <i>unavailable</i> if <code>arguments</code> is
   771      * argument is <i>unavailable</i> if <code>arguments</code> is
   767      * <code>null</code> or has fewer than argumentIndex+1 elements.
   772      * <code>null</code> or has fewer than argumentIndex+1 elements.
   768      *
   773      *
   769      * <table border=1 summary="Examples of subformat,argument,and formatted text">
   774      * <table class="plain">
       
   775      * <caption style="display:none">Examples of subformat,argument,and formatted text</caption>
       
   776      * <thead>
   770      *    <tr>
   777      *    <tr>
   771      *       <th>Subformat
   778      *       <th>Subformat
   772      *       <th>Argument
   779      *       <th>Argument
   773      *       <th>Formatted Text
   780      *       <th>Formatted Text
       
   781      * </thead>
       
   782      * <tbody>
   774      *    <tr>
   783      *    <tr>
   775      *       <td><i>any</i>
   784      *       <td><i>any</i>
   776      *       <td><i>unavailable</i>
   785      *       <td><i>unavailable</i>
   777      *       <td><code>"{" + argumentIndex + "}"</code>
   786      *       <td><code>"{" + argumentIndex + "}"</code>
   778      *    <tr>
   787      *    <tr>
   803      *       <td><code>argument</code>
   812      *       <td><code>argument</code>
   804      *    <tr>
   813      *    <tr>
   805      *       <td><code>null</code>
   814      *       <td><code>null</code>
   806      *       <td><i>any</i>
   815      *       <td><i>any</i>
   807      *       <td><code>argument.toString()</code>
   816      *       <td><code>argument.toString()</code>
       
   817      * </tbody>
   808      * </table>
   818      * </table>
   809      * <p>
   819      * <p>
   810      * If <code>pos</code> is non-null, and refers to
   820      * If <code>pos</code> is non-null, and refers to
   811      * <code>Field.ARGUMENT</code>, the location of the first formatted
   821      * <code>Field.ARGUMENT</code>, the location of the first formatted
   812      * string will be returned.
   822      * string will be returned.