src/java.base/share/classes/java/text/FieldPosition.java
changeset 58288 48e480e56aad
parent 47216 71c04702a3d5
--- a/src/java.base/share/classes/java/text/FieldPosition.java	Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/text/FieldPosition.java	Tue Sep 24 09:43:43 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,33 +39,33 @@
 package java.text;
 
 /**
- * <code>FieldPosition</code> is a simple class used by <code>Format</code>
+ * {@code FieldPosition} is a simple class used by {@code Format}
  * and its subclasses to identify fields in formatted output. Fields can
  * be identified in two ways:
  * <ul>
  *  <li>By an integer constant, whose names typically end with
- *      <code>_FIELD</code>. The constants are defined in the various
- *      subclasses of <code>Format</code>.
- *  <li>By a <code>Format.Field</code> constant, see <code>ERA_FIELD</code>
- *      and its friends in <code>DateFormat</code> for an example.
+ *      {@code _FIELD}. The constants are defined in the various
+ *      subclasses of {@code Format}.
+ *  <li>By a {@code Format.Field} constant, see {@code ERA_FIELD}
+ *      and its friends in {@code DateFormat} for an example.
  * </ul>
  * <p>
- * <code>FieldPosition</code> keeps track of the position of the
+ * {@code FieldPosition} keeps track of the position of the
  * field within the formatted output with two indices: the index
  * of the first character of the field and the index of the last
  * character of the field.
  *
  * <p>
- * One version of the <code>format</code> method in the various
- * <code>Format</code> classes requires a <code>FieldPosition</code>
- * object as an argument. You use this <code>format</code> method
+ * One version of the {@code format} method in the various
+ * {@code Format} classes requires a {@code FieldPosition}
+ * object as an argument. You use this {@code format} method
  * to perform partial formatting or to get information about the
  * formatted output (such as the position of a field).
  *
  * <p>
  * If you are interested in the positions of all attributes in the
- * formatted string use the <code>Format</code> method
- * <code>formatToCharacterIterator</code>.
+ * formatted string use the {@code Format} method
+ * {@code formatToCharacterIterator}.
  *
  * @author      Mark Davis
  * @since 1.1
@@ -113,9 +113,9 @@
 
     /**
      * Creates a FieldPosition object for the given field constant. Fields are
-     * identified by constants defined in the various <code>Format</code>
+     * identified by constants defined in the various {@code Format}
      * subclasses. This is equivalent to calling
-     * <code>new FieldPosition(attribute, -1)</code>.
+     * {@code new FieldPosition(attribute, -1)}.
      *
      * @param attribute Format.Field constant identifying a field
      * @since 1.4
@@ -125,16 +125,16 @@
     }
 
     /**
-     * Creates a <code>FieldPosition</code> object for the given field.
+     * Creates a {@code FieldPosition} object for the given field.
      * The field is identified by an attribute constant from one of the
-     * <code>Field</code> subclasses as well as an integer field ID
-     * defined by the <code>Format</code> subclasses. <code>Format</code>
-     * subclasses that are aware of <code>Field</code> should give precedence
-     * to <code>attribute</code> and ignore <code>fieldID</code> if
-     * <code>attribute</code> is not null. However, older <code>Format</code>
-     * subclasses may not be aware of <code>Field</code> and rely on
-     * <code>fieldID</code>. If the field has no corresponding integer
-     * constant, <code>fieldID</code> should be -1.
+     * {@code Field} subclasses as well as an integer field ID
+     * defined by the {@code Format} subclasses. {@code Format}
+     * subclasses that are aware of {@code Field} should give precedence
+     * to {@code attribute} and ignore {@code fieldID} if
+     * {@code attribute} is not null. However, older {@code Format}
+     * subclasses may not be aware of {@code Field} and rely on
+     * {@code fieldID}. If the field has no corresponding integer
+     * constant, {@code fieldID} should be -1.
      *
      * @param attribute Format.Field constant identifying a field
      * @param fieldID integer constant identifying a field
@@ -147,7 +147,7 @@
 
     /**
      * Returns the field identifier as an attribute constant
-     * from one of the <code>Field</code> subclasses. May return null if
+     * from one of the {@code Field} subclasses. May return null if
      * the field is specified only by an integer field ID.
      *
      * @return Identifier for the field
@@ -206,7 +206,7 @@
     }
 
     /**
-     * Returns a <code>Format.FieldDelegate</code> instance that is associated
+     * Returns a {@code Format.FieldDelegate} instance that is associated
      * with the FieldPosition. When the delegate is notified of the same
      * field the FieldPosition is associated with, the begin/end will be
      * adjusted.
@@ -258,8 +258,8 @@
 
 
     /**
-     * Return true if the receiver wants a <code>Format.Field</code> value and
-     * <code>attribute</code> is equal to it.
+     * Return true if the receiver wants a {@code Format.Field} value and
+     * {@code attribute} is equal to it.
      */
     private boolean matchesField(Format.Field attribute) {
         if (this.attribute != null) {
@@ -269,9 +269,9 @@
     }
 
     /**
-     * Return true if the receiver wants a <code>Format.Field</code> value and
-     * <code>attribute</code> is equal to it, or true if the receiver
-     * represents an inteter constant and <code>field</code> equals it.
+     * Return true if the receiver wants a {@code Format.Field} value and
+     * {@code attribute} is equal to it, or true if the receiver
+     * represents an inteter constant and {@code field} equals it.
      */
     private boolean matchesField(Format.Field attribute, int field) {
         if (this.attribute != null) {
@@ -289,7 +289,7 @@
     private class Delegate implements Format.FieldDelegate {
         /**
          * Indicates whether the field has been  encountered before. If this
-         * is true, and <code>formatted</code> is invoked, the begin/end
+         * is true, and {@code formatted} is invoked, the begin/end
          * are not updated.
          */
         private boolean encounteredField;