< prev index next >

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

Print this page

        

*** 330,340 **** * @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 then 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) { --- 330,340 ---- * @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 * 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) {
*** 355,365 **** * @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 then * 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. */ --- 355,365 ---- * @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 * 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,588 **** * * @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 then 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); --- 578,588 ---- * * @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, * 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 >