< prev index next >

src/java.base/share/classes/java/text/AttributedString.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

@@ -115,11 +115,11 @@
     }
 
     /**
      * Constructs an AttributedString instance with the given text.
      * @param text The text for this attributed string.
-     * @exception NullPointerException if <code>text</code> is null.
+     * @throws    NullPointerException if <code>text</code> is null.
      */
     public AttributedString(String text) {
         if (text == null) {
             throw new NullPointerException();
         }

@@ -128,13 +128,13 @@
 
     /**
      * Constructs an AttributedString instance with the given text and attributes.
      * @param text The text for this attributed string.
      * @param attributes The attributes that apply to the entire string.
-     * @exception NullPointerException if <code>text</code> or
+     * @throws    NullPointerException if <code>text</code> or
      *            <code>attributes</code> is null.
-     * @exception IllegalArgumentException if the text has length 0
+     * @throws    IllegalArgumentException if the text has length 0
      * and the attributes parameter is not an empty Map (attributes
      * cannot be applied to a 0-length range).
      */
     public AttributedString(String text,
                             Map<? extends Attribute, ?> attributes)

@@ -169,11 +169,11 @@
 
     /**
      * Constructs an AttributedString instance with the given attributed
      * text represented by AttributedCharacterIterator.
      * @param text The text for this attributed string.
-     * @exception NullPointerException if <code>text</code> is null.
+     * @throws    NullPointerException if <code>text</code> is null.
      */
     public AttributedString(AttributedCharacterIterator text) {
         // If performance is critical, this constructor should be
         // implemented here rather than invoking the constructor for a
         // subrange. We can avoid some range checking in the loops.

@@ -190,12 +190,12 @@
      *
      * @param text The text for this attributed string.
      * @param beginIndex Index of the first character of the range.
      * @param endIndex Index of the character following the last character
      * of the range.
-     * @exception NullPointerException if <code>text</code> is null.
-     * @exception IllegalArgumentException if the subrange given by
+     * @throws    NullPointerException if <code>text</code> is null.
+     * @throws    IllegalArgumentException if the subrange given by
      * beginIndex and endIndex is out of the text range.
      * @see java.text.Annotation
      */
     public AttributedString(AttributedCharacterIterator text,
                             int beginIndex,

@@ -218,12 +218,12 @@
      * @param endIndex Index of the character following the last character
      * of the range.
      * @param attributes Specifies attributes to be extracted
      * from the text. If null is specified, all available attributes will
      * be used.
-     * @exception NullPointerException if <code>text</code> is null.
-     * @exception IllegalArgumentException if the subrange given by
+     * @throws    NullPointerException if <code>text</code> is null.
+     * @throws    IllegalArgumentException if the subrange given by
      * beginIndex and endIndex is out of the text range.
      * @see java.text.Annotation
      */
     public AttributedString(AttributedCharacterIterator text,
                             int beginIndex,

@@ -305,12 +305,12 @@
 
     /**
      * Adds an attribute to the entire string.
      * @param attribute the attribute key
      * @param value the value of the attribute; may be null
-     * @exception NullPointerException if <code>attribute</code> is null.
-     * @exception IllegalArgumentException if the AttributedString has length 0
+     * @throws    NullPointerException if <code>attribute</code> is null.
+     * @throws    IllegalArgumentException if the AttributedString has length 0
      * (attributes cannot be applied to a 0-length range).
      */
     public void addAttribute(Attribute attribute, Object value) {
 
         if (attribute == null) {

@@ -329,12 +329,12 @@
      * Adds an attribute to a subrange of the string.
      * @param attribute the attribute key
      * @param value The value of the attribute. May be null.
      * @param beginIndex Index of the first character of the range.
      * @param endIndex Index of the character following the last character of the range.
-     * @exception NullPointerException if <code>attribute</code> is null.
-     * @exception IllegalArgumentException if beginIndex is less than 0, endIndex is
+     * @throws    NullPointerException if <code>attribute</code> is null.
+     * @throws    IllegalArgumentException if beginIndex is less than 0, endIndex is
      * greater than the length of the string, or beginIndex and endIndex together don't
      * define a non-empty subrange of the string.
      */
     public void addAttribute(Attribute attribute, Object value,
             int beginIndex, int endIndex) {

@@ -354,12 +354,12 @@
      * Adds a set of attributes to a subrange of the string.
      * @param attributes The attributes to be added to the string.
      * @param beginIndex Index of the first character of the range.
      * @param endIndex Index of the character following the last
      * character of the range.
-     * @exception NullPointerException if <code>attributes</code> is null.
-     * @exception IllegalArgumentException if beginIndex is less than
+     * @throws    NullPointerException if <code>attributes</code> is null.
+     * @throws    IllegalArgumentException if beginIndex is less than
      * 0, endIndex is greater than the length of the string, or
      * beginIndex and endIndex together don't define a non-empty
      * subrange of the string and the attributes parameter is not an
      * empty Map.
      */

@@ -578,11 +578,11 @@
      *
      * @param attributes a list of attributes that the client is interested in
      * @param beginIndex the index of the first character
      * @param endIndex the index of the character following the last character
      * @return an iterator providing access to the text and its attributes
-     * @exception IllegalArgumentException if beginIndex is less than 0,
+     * @throws    IllegalArgumentException if beginIndex is less than 0,
      * endIndex is greater than the length of the string, or beginIndex is
      * greater than endIndex.
      */
     public AttributedCharacterIterator getIterator(Attribute[] attributes, int beginIndex, int endIndex) {
         return new AttributedStringIterator(attributes, beginIndex, endIndex);
< prev index next >