Here's a set of cleanup fixes for the spec for our friends
StringBuffer and StringBuilder.
I don't think they change the spec in a substantive way,
but y'all Sun folk might want to submit them to CCC together with the
substantive changes.
We really need BlenderRevs of these to be able to do a proper review.
Martin
diff --git a/src/share/classes/java/lang/AbstractStringBuilder.java
b/src/share/classes/java/lang/AbstractStringBuilder.java
--- a/src/share/classes/java/lang/AbstractStringBuilder.java
+++ b/src/share/classes/java/lang/AbstractStringBuilder.java
@@ -42,7 +42,7 @@
/**
* The value is used for character storage.
*/
- char value[];
+ char[] value;
/**
* The count is the number of characters used.
@@ -333,8 +333,7 @@
* <code>dst.length</code>
* </ul>
*/
- public void getChars(int srcBegin, int srcEnd, char dst[],
- int dstBegin)
+ public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
{
if (srcBegin < 0)
throw new StringIndexOutOfBoundsException(srcBegin);
@@ -366,14 +365,14 @@
}
/**
- * Appends the string representation of the <code>Object</code>
- * argument.
+ * Appends the string representation of the [EMAIL PROTECTED] Object}
argument.
* <p>
- * The argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then appended to this sequence.
+ * The overall effect is exactly as if the argument were converted
+ * to a string by the method [EMAIL PROTECTED] String#valueOf(Object)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #append(String) appended} to this character sequence.
*
- * @param obj an <code>Object</code>.
+ * @param obj an [EMAIL PROTECTED] Object}.
* @return a reference to this object.
*/
public AbstractStringBuilder append(Object obj) {
@@ -383,17 +382,17 @@
/**
* Appends the specified string to this character sequence.
* <p>
- * The characters of the <code>String</code> argument are appended, in
+ * The characters of the [EMAIL PROTECTED] String} argument are appended,
in
* order, increasing the length of this sequence by the length of the
- * argument. If <code>str</code> is <code>null</code>, then the four
- * characters <code>"null"</code> are appended.
+ * argument. If [EMAIL PROTECTED] str} is [EMAIL PROTECTED] null}, then
the four
+ * characters [EMAIL PROTECTED] "null"} are appended.
* <p>
* Let <i>n</i> be the length of this character sequence just prior to
- * execution of the <code>append</code> method. Then the character at
+ * execution of the [EMAIL PROTECTED] append} method. Then the character at
* index <i>k</i> in the new character sequence is equal to the character
* at index <i>k</i> in the old character sequence, if <i>k</i> is less
* than <i>n</i>; otherwise, it is equal to the character at index
- * <i>k-n</i> in the argument <code>str</code>.
+ * <i>k-n</i> in the argument [EMAIL PROTECTED] str}.
*
* @param str a string.
* @return a reference to this object.
@@ -435,33 +434,33 @@
}
/**
- * Appends a subsequence of the specified <code>CharSequence</code> to this
+ * Appends a subsequence of the specified [EMAIL PROTECTED] CharSequence}
to this
* sequence.
* <p>
- * Characters of the argument <code>s</code>, starting at
- * index <code>start</code>, are appended, in order, to the contents of
- * this sequence up to the (exclusive) index <code>end</code>. The length
- * of this sequence is increased by the value of <code>end - start</code>.
+ * Characters of the argument [EMAIL PROTECTED] s}, starting at
+ * index [EMAIL PROTECTED] start}, are appended, in order, to the contents
of
+ * this sequence up to the (exclusive) index [EMAIL PROTECTED] end}. The
length
+ * of this sequence is increased by the value of [EMAIL PROTECTED] end -
start}.
* <p>
* Let <i>n</i> be the length of this character sequence just prior to
- * execution of the <code>append</code> method. Then the character at
+ * execution of the [EMAIL PROTECTED] append} method. Then the character at
* index <i>k</i> in this character sequence becomes equal to the
* character at index <i>k</i> in this sequence, if <i>k</i> is less than
* <i>n</i>; otherwise, it is equal to the character at index
- * <i>k+start-n</i> in the argument <code>s</code>.
+ * <i>k+start-n</i> in the argument [EMAIL PROTECTED] s}.
* <p>
- * If <code>s</code> is <code>null</code>, then this method appends
+ * If [EMAIL PROTECTED] s} is [EMAIL PROTECTED] null}, then this method
appends
* characters as if the s parameter was a sequence containing the four
- * characters <code>"null"</code>.
+ * characters [EMAIL PROTECTED] "null"}.
*
* @param s the sequence to append.
* @param start the starting index of the subsequence to be appended.
* @param end the end index of the subsequence to be appended.
* @return a reference to this object.
* @throws IndexOutOfBoundsException if
- * <code>start</code> or <code>end</code> are negative, or
- * <code>start</code> is greater than <code>end</code> or
- * <code>end</code> is greater than <code>s.length()</code>
+ * [EMAIL PROTECTED] start} is negative, or
+ * [EMAIL PROTECTED] start} is greater than [EMAIL PROTECTED]
end} or
+ * [EMAIL PROTECTED] end} is greater than [EMAIL PROTECTED]
s.length()}
*/
public AbstractStringBuilder append(CharSequence s, int start, int end) {
if (s == null)
@@ -483,22 +482,22 @@
}
/**
- * Appends the string representation of the <code>char</code> array
+ * Appends the string representation of the [EMAIL PROTECTED] char} array
* argument to this sequence.
* <p>
* The characters of the array argument are appended, in order, to
* the contents of this sequence. The length of this sequence
* increases by the length of the argument.
* <p>
- * The overall effect is exactly as if the argument were converted to
- * a string by the method [EMAIL PROTECTED] String#valueOf(char[])} and the
- * characters of that string were then [EMAIL PROTECTED] #append(String)
appended}
- * to this character sequence.
+ * The overall effect is exactly as if the argument were converted
+ * to a string by the method [EMAIL PROTECTED] String#valueOf(char[])},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #append(String) appended} to this character sequence.
*
* @param str the characters to be appended.
* @return a reference to this object.
*/
- public AbstractStringBuilder append(char str[]) {
+ public AbstractStringBuilder append(char[] str) {
int newCount = count + str.length;
if (newCount > value.length)
expandCapacity(newCount);
@@ -509,21 +508,21 @@
/**
* Appends the string representation of a subarray of the
- * <code>char</code> array argument to this sequence.
+ * [EMAIL PROTECTED] char} array argument to this sequence.
* <p>
- * Characters of the <code>char</code> array <code>str</code>, starting at
- * index <code>offset</code>, are appended, in order, to the contents
+ * Characters of the [EMAIL PROTECTED] char} array [EMAIL PROTECTED] str},
starting at
+ * index [EMAIL PROTECTED] offset}, are appended, in order, to the contents
* of this sequence. The length of this sequence increases
- * by the value of <code>len</code>.
+ * by the value of [EMAIL PROTECTED] len}.
* <p>
- * The overall effect is exactly as if the arguments were converted to
- * a string by the method [EMAIL PROTECTED]
String#valueOf(char[],int,int)} and the
- * characters of that string were then [EMAIL PROTECTED] #append(String)
appended}
- * to this character sequence.
+ * The overall effect is exactly as if the arguments were converted
+ * to a string by the method [EMAIL PROTECTED]
String#valueOf(char[],int,int)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #append(String) appended} to this character sequence.
*
* @param str the characters to be appended.
- * @param offset the index of the first <code>char</code> to append.
- * @param len the number of <code>char</code>s to append.
+ * @param offset the index of the first [EMAIL PROTECTED] char} to
append.
+ * @param len the number of [EMAIL PROTECTED] char}s to append.
* @return a reference to this object.
* @throws IndexOutOfBoundsException
* if [EMAIL PROTECTED] offset < 0} or [EMAIL PROTECTED] len < 0}
@@ -539,14 +538,15 @@
}
/**
- * Appends the string representation of the <code>boolean</code>
+ * Appends the string representation of the [EMAIL PROTECTED] boolean}
* argument to the sequence.
* <p>
- * The argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then appended to this sequence.
+ * The overall effect is exactly as if the argument were converted
+ * to a string by the method [EMAIL PROTECTED] String#valueOf(boolean)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #append(String) appended} to this character sequence.
*
- * @param b a <code>boolean</code>.
+ * @param b a [EMAIL PROTECTED] boolean}.
* @return a reference to this object.
*/
public AbstractStringBuilder append(boolean b) {
@@ -572,18 +572,18 @@
}
/**
- * Appends the string representation of the <code>char</code>
+ * Appends the string representation of the [EMAIL PROTECTED] char}
* argument to this sequence.
* <p>
* The argument is appended to the contents of this sequence.
- * The length of this sequence increases by <code>1</code>.
+ * The length of this sequence increases by [EMAIL PROTECTED] 1}.
* <p>
- * The overall effect is exactly as if the argument were converted to
- * a string by the method [EMAIL PROTECTED] String#valueOf(char)} and the
character
- * in that string were then [EMAIL PROTECTED] #append(String) appended} to
this
- * character sequence.
+ * The overall effect is exactly as if the argument were converted
+ * to a string by the method [EMAIL PROTECTED] String#valueOf(char)},
+ * and the character in that string were then
+ * [EMAIL PROTECTED] #append(String) appended} to this character sequence.
*
- * @param c a <code>char</code>.
+ * @param c a [EMAIL PROTECTED] char}.
* @return a reference to this object.
*/
public AbstractStringBuilder append(char c) {
@@ -595,14 +595,15 @@
}
/**
- * Appends the string representation of the <code>int</code>
+ * Appends the string representation of the [EMAIL PROTECTED] int}
* argument to this sequence.
* <p>
- * The argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then appended to this sequence.
+ * The overall effect is exactly as if the argument were converted
+ * to a string by the method [EMAIL PROTECTED] String#valueOf(int)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #append(String) appended} to this character sequence.
*
- * @param i an <code>int</code>.
+ * @param i an [EMAIL PROTECTED] int}.
* @return a reference to this object.
*/
public AbstractStringBuilder append(int i) {
@@ -621,14 +622,15 @@
}
/**
- * Appends the string representation of the <code>long</code>
+ * Appends the string representation of the [EMAIL PROTECTED] long}
* argument to this sequence.
* <p>
- * The argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then appended to this sequence.
+ * The overall effect is exactly as if the argument were converted
+ * to a string by the method [EMAIL PROTECTED] String#valueOf(long)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #append(String) appended} to this character sequence.
*
- * @param l a <code>long</code>.
+ * @param l a [EMAIL PROTECTED] long}.
* @return a reference to this object.
*/
public AbstractStringBuilder append(long l) {
@@ -647,14 +649,15 @@
}
/**
- * Appends the string representation of the <code>float</code>
+ * Appends the string representation of the [EMAIL PROTECTED] float}
* argument to this sequence.
* <p>
- * The argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then appended to this string sequence.
+ * The overall effect is exactly as if the argument were converted
+ * to a string by the method [EMAIL PROTECTED] String#valueOf(float)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #append(String) appended} to this character sequence.
*
- * @param f a <code>float</code>.
+ * @param f a [EMAIL PROTECTED] float}.
* @return a reference to this object.
*/
public AbstractStringBuilder append(float f) {
@@ -663,14 +666,15 @@
}
/**
- * Appends the string representation of the <code>double</code>
+ * Appends the string representation of the [EMAIL PROTECTED] double}
* argument to this sequence.
* <p>
- * The argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then appended to this sequence.
+ * The overall effect is exactly as if the argument were converted
+ * to a string by the method [EMAIL PROTECTED] String#valueOf(double)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #append(String) appended} to this character sequence.
*
- * @param d a <code>double</code>.
+ * @param d a [EMAIL PROTECTED] double}.
* @return a reference to this object.
*/
public AbstractStringBuilder append(double d) {
@@ -680,17 +684,17 @@
/**
* Removes the characters in a substring of this sequence.
- * The substring begins at the specified <code>start</code> and extends to
- * the character at index <code>end - 1</code> or to the end of the
+ * The substring begins at the specified [EMAIL PROTECTED] start} and
extends to
+ * the character at index [EMAIL PROTECTED] end - 1} or to the end of the
* sequence if no such character exists. If
- * <code>start</code> is equal to <code>end</code>, no changes are made.
+ * [EMAIL PROTECTED] start} is equal to [EMAIL PROTECTED] end}, no changes
are made.
*
* @param start The beginning index, inclusive.
* @param end The ending index, exclusive.
* @return This object.
- * @throws StringIndexOutOfBoundsException if <code>start</code>
- * is negative, greater than <code>length()</code>, or
- * greater than <code>end</code>.
+ * @throws StringIndexOutOfBoundsException if [EMAIL PROTECTED] start}
+ * is negative, greater than [EMAIL PROTECTED] length()}, or
+ * greater than [EMAIL PROTECTED] end}.
*/
public AbstractStringBuilder delete(int start, int end) {
if (start < 0)
@@ -708,7 +712,7 @@
}
/**
- * Appends the string representation of the <code>codePoint</code>
+ * Appends the string representation of the [EMAIL PROTECTED] codePoint}
* argument to this sequence.
*
* <p> The argument is appended to the contents of this sequence.
@@ -716,15 +720,15 @@
* [EMAIL PROTECTED] Character#charCount(int)
Character.charCount(codePoint)}.
*
* <p> The overall effect is exactly as if the argument were
- * converted to a <code>char</code> array by the method [EMAIL PROTECTED]
- * Character#toChars(int)} and the character in that array were
- * then [EMAIL PROTECTED] #append(char[]) appended} to this character
+ * converted to a [EMAIL PROTECTED] char} array by the method
+ * [EMAIL PROTECTED] Character#toChars(int)} and the character in that
array
+ * were then [EMAIL PROTECTED] #append(char[]) appended} to this character
* sequence.
*
* @param codePoint a Unicode code point
* @return a reference to this object.
* @exception IllegalArgumentException if the specified
- * <code>codePoint</code> isn't a valid Unicode code point
+ * [EMAIL PROTECTED] codePoint} isn't a valid Unicode code point
*/
public AbstractStringBuilder appendCodePoint(int codePoint) {
if (!Character.isValidCodePoint(codePoint)) {
@@ -882,27 +886,27 @@
}
/**
- * Inserts the string representation of a subarray of the <code>str</code>
+ * Inserts the string representation of a subarray of the [EMAIL
PROTECTED] str}
* array argument into this sequence. The subarray begins at the
- * specified <code>offset</code> and extends <code>len</code>
<code>char</code>s.
+ * specified [EMAIL PROTECTED] offset} and extends [EMAIL PROTECTED] len}
[EMAIL PROTECTED] char}s.
* The characters of the subarray are inserted into this sequence at
- * the position indicated by <code>index</code>. The length of this
- * sequence increases by <code>len</code> <code>char</code>s.
+ * the position indicated by [EMAIL PROTECTED] index}. The length of this
+ * sequence increases by [EMAIL PROTECTED] len} [EMAIL PROTECTED] char}s.
*
* @param index position at which to insert subarray.
- * @param str A <code>char</code> array.
- * @param offset the index of the first <code>char</code>
in subarray to
+ * @param str A [EMAIL PROTECTED] char} array.
+ * @param offset the index of the first [EMAIL PROTECTED] char} in
subarray to
* be inserted.
- * @param len the number of <code>char</code>s in the subarray to
+ * @param len the number of [EMAIL PROTECTED] char}s in the
subarray to
* be inserted.
* @return This object
- * @throws StringIndexOutOfBoundsException if <code>index</code>
- * is negative or greater than <code>length()</code>, or
- * <code>offset</code> or <code>len</code> are negative, or
- * <code>(offset+len)</code> is greater than
- * <code>str.length</code>.
+ * @throws StringIndexOutOfBoundsException if [EMAIL PROTECTED] index}
+ * is negative or greater than [EMAIL PROTECTED] length()}, or
+ * [EMAIL PROTECTED] offset} or [EMAIL PROTECTED] len} are
negative, or
+ * [EMAIL PROTECTED] (offset+len)} is greater than
+ * [EMAIL PROTECTED] str.length}.
*/
- public AbstractStringBuilder insert(int index, char str[], int offset,
+ public AbstractStringBuilder insert(int index, char[] str, int offset,
int len)
{
if ((index < 0) || (index > length()))
@@ -921,20 +925,20 @@
}
/**
- * Inserts the string representation of the <code>Object</code>
+ * Inserts the string representation of the [EMAIL PROTECTED] Object}
* argument into this character sequence.
* <p>
- * The second argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then inserted into this sequence at the indicated
- * offset.
+ * The overall effect is exactly as if the second argument were
+ * converted to a string by the method [EMAIL PROTECTED]
String#valueOf(Object)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #insert(int,String) inserted} into this character
+ * sequence at the indicated offset.
* <p>
- * The offset argument must be greater than or equal to
- * <code>0</code>, and less than or equal to the length of this
- * sequence.
+ * The [EMAIL PROTECTED] offset} argument must be greater than or equal to
[EMAIL PROTECTED] 0},
+ * and less than or equal to the [EMAIL PROTECTED] #length()} of this
sequence.
*
* @param offset the offset.
- * @param obj an <code>Object</code>.
+ * @param obj an [EMAIL PROTECTED] Object}.
* @return a reference to this object.
* @throws StringIndexOutOfBoundsException if the offset is invalid.
*/
@@ -945,28 +949,27 @@
/**
* Inserts the string into this character sequence.
* <p>
- * The characters of the <code>String</code> argument are inserted, in
+ * The characters of the [EMAIL PROTECTED] String} argument are inserted,
in
* order, into this sequence at the indicated offset, moving up any
* characters originally above that position and increasing the length
* of this sequence by the length of the argument. If
- * <code>str</code> is <code>null</code>, then the four characters
- * <code>"null"</code> are inserted into this sequence.
+ * [EMAIL PROTECTED] str} is [EMAIL PROTECTED] null}, then the four
characters
+ * [EMAIL PROTECTED] "null"} are inserted into this sequence.
* <p>
* The character at index <i>k</i> in the new character sequence is
* equal to:
* <ul>
* <li>the character at index <i>k</i> in the old character sequence, if
- * <i>k</i> is less than <code>offset</code>
- * <li>the character at index <i>k</i><code>-offset</code> in the
- * argument <code>str</code>, if <i>k</i> is not less than
- * <code>offset</code> but is less than <code>offset+str.length()</code>
- * <li>the character at index <i>k</i><code>-str.length()</code> in the
+ * <i>k</i> is less than [EMAIL PROTECTED] offset}
+ * <li>the character at index <i>k</i>[EMAIL PROTECTED] -offset} in the
+ * argument [EMAIL PROTECTED] str}, if <i>k</i> is not less than
+ * [EMAIL PROTECTED] offset} but is less than [EMAIL PROTECTED]
offset+str.length()}
+ * <li>the character at index <i>k</i>[EMAIL PROTECTED] -str.length()} in
the
* old character sequence, if <i>k</i> is not less than
- * <code>offset+str.length()</code>
+ * [EMAIL PROTECTED] offset+str.length()}
* </ul><p>
- * The offset argument must be greater than or equal to
- * <code>0</code>, and less than or equal to the length of this
- * sequence.
+ * The [EMAIL PROTECTED] offset} argument must be greater than or equal to
[EMAIL PROTECTED] 0},
+ * and less than or equal to the [EMAIL PROTECTED] #length()} of this
sequence.
*
* @param offset the offset.
* @param str a string.
@@ -989,27 +992,29 @@
}
/**
- * Inserts the string representation of the <code>char</code> array
+ * Inserts the string representation of the [EMAIL PROTECTED] char} array
* argument into this sequence.
* <p>
* The characters of the array argument are inserted into the
* contents of this sequence at the position indicated by
- * <code>offset</code>. The length of this sequence increases by
+ * [EMAIL PROTECTED] offset}. The length of this sequence increases by
* the length of the argument.
* <p>
- * The overall effect is exactly as if the argument were converted to
- * a string by the method [EMAIL PROTECTED] String#valueOf(char[])} and the
- * characters of that string were then
- * [EMAIL PROTECTED] #insert(int,String) inserted} into this
- * character sequence at the position indicated by
- * <code>offset</code>.
+ * The overall effect is exactly as if the second argument were
+ * converted to a string by the method [EMAIL PROTECTED]
String#valueOf(char[])},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #insert(int,String) inserted} into this character
+ * sequence at the indicated offset.
+ * <p>
+ * The [EMAIL PROTECTED] offset} argument must be greater than or equal to
[EMAIL PROTECTED] 0},
+ * and less than or equal to the [EMAIL PROTECTED] #length()} of this
sequence.
*
* @param offset the offset.
* @param str a character array.
* @return a reference to this object.
* @throws StringIndexOutOfBoundsException if the offset is invalid.
*/
- public AbstractStringBuilder insert(int offset, char str[]) {
+ public AbstractStringBuilder insert(int offset, char[] str) {
if ((offset < 0) || (offset > length()))
throw new StringIndexOutOfBoundsException(offset);
int len = str.length;
@@ -1023,18 +1028,20 @@
}
/**
- * Inserts the specified <code>CharSequence</code> into this sequence.
+ * Inserts the specified [EMAIL PROTECTED] CharSequence} into this
sequence.
* <p>
- * The characters of the <code>CharSequence</code> argument are inserted,
+ * The characters of the [EMAIL PROTECTED] CharSequence} argument are
inserted,
* in order, into this sequence at the indicated offset, moving up
* any characters originally above that position and increasing the length
* of this sequence by the length of the argument s.
* <p>
* The result of this method is exactly the same as if it were an
- * invocation of this object's insert(dstOffset, s, 0, s.length()) method.
+ * invocation of this object's
+ * [EMAIL PROTECTED] #insert(int,CharSequence,int,int) insert}(dstOffset,
s,
0, s.length())
+ * method.
*
- * <p>If <code>s</code> is <code>null</code>, then the four characters
- * <code>"null"</code> are inserted into this sequence.
+ * <p>If [EMAIL PROTECTED] s} is [EMAIL PROTECTED] null}, then the four
characters
+ * [EMAIL PROTECTED] "null"} are inserted into this sequence.
*
* @param dstOffset the offset.
* @param s the sequence to be inserted
@@ -1050,48 +1057,47 @@
}
/**
- * Inserts a subsequence of the specified <code>CharSequence</code> into
+ * Inserts a subsequence of the specified [EMAIL PROTECTED] CharSequence}
into
* this sequence.
* <p>
- * The subsequence of the argument <code>s</code> specified by
- * <code>start</code> and <code>end</code> are inserted,
+ * The subsequence of the argument [EMAIL PROTECTED] s} specified by
+ * [EMAIL PROTECTED] start} and [EMAIL PROTECTED] end} are inserted,
* in order, into this sequence at the specified destination offset, moving
* up any characters originally above that position. The length of this
- * sequence is increased by <code>end - start</code>.
+ * sequence is increased by [EMAIL PROTECTED] end - start}.
* <p>
* The character at index <i>k</i> in this sequence becomes equal to:
* <ul>
* <li>the character at index <i>k</i> in this sequence, if
- * <i>k</i> is less than <code>dstOffset</code>
- * <li>the character at index <i>k</i><code>+start-dstOffset</code> in
- * the argument <code>s</code>, if <i>k</i> is greater than or equal to
- * <code>dstOffset</code> but is less than <code>dstOffset+end-start</code>
- * <li>the character at index <i>k</i><code>-(end-start)</code> in this
+ * <i>k</i> is less than [EMAIL PROTECTED] dstOffset}
+ * <li>the character at index <i>k</i>[EMAIL PROTECTED] +start-dstOffset}
in
+ * the argument [EMAIL PROTECTED] s}, if <i>k</i> is greater than or equal
to
+ * [EMAIL PROTECTED] dstOffset} but is less than [EMAIL PROTECTED]
dstOffset+end-start}
+ * <li>the character at index <i>k</i>[EMAIL PROTECTED] -(end-start)} in
this
* sequence, if <i>k</i> is greater than or equal to
- * <code>dstOffset+end-start</code>
+ * [EMAIL PROTECTED] dstOffset+end-start}
* </ul><p>
- * The dstOffset argument must be greater than or equal to
- * <code>0</code>, and less than or equal to the length of this
- * sequence.
+ * The [EMAIL PROTECTED] dstOffset} argument must be greater than or equal
to [EMAIL PROTECTED] 0},
+ * and less than or equal to the [EMAIL PROTECTED] #length()} of this
sequence.
* <p>The start argument must be nonnegative, and not greater than
- * <code>end</code>.
+ * [EMAIL PROTECTED] end}.
* <p>The end argument must be greater than or equal to
- * <code>start</code>, and less than or equal to the length of s.
+ * [EMAIL PROTECTED] start}, and less than or equal to the length of s.
*
- * <p>If <code>s</code> is <code>null</code>, then this method inserts
+ * <p>If [EMAIL PROTECTED] s} is [EMAIL PROTECTED] null}, then this method
inserts
* characters as if the s parameter was a sequence containing the four
- * characters <code>"null"</code>.
+ * characters [EMAIL PROTECTED] "null"}.
*
* @param dstOffset the offset in this sequence.
* @param s the sequence to be inserted.
* @param start the starting index of the subsequence to
be inserted.
* @param end the end index of the subsequence to be inserted.
* @return a reference to this object.
- * @throws IndexOutOfBoundsException if <code>dstOffset</code>
- * is negative or greater than <code>this.length()</code>, or
- * <code>start</code> or <code>end</code> are negative, or
- * <code>start</code> is greater than <code>end</code> or
- * <code>end</code> is greater than <code>s.length()</code>
+ * @throws IndexOutOfBoundsException if [EMAIL PROTECTED] dstOffset}
+ * is negative or greater than [EMAIL PROTECTED]
this.length()}, or
+ * [EMAIL PROTECTED] start} or [EMAIL PROTECTED] end} are
negative, or
+ * [EMAIL PROTECTED] start} is greater than [EMAIL PROTECTED]
end} or
+ * [EMAIL PROTECTED] end} is greater than [EMAIL PROTECTED]
s.length()}
*/
public AbstractStringBuilder insert(int dstOffset, CharSequence s,
int start, int end) {
@@ -1118,20 +1124,20 @@
}
/**
- * Inserts the string representation of the <code>boolean</code>
+ * Inserts the string representation of the [EMAIL PROTECTED] boolean}
* argument into this sequence.
* <p>
- * The second argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then inserted into this sequence at the indicated
- * offset.
+ * The overall effect is exactly as if the second argument were
+ * converted to a string by the method [EMAIL PROTECTED]
String#valueOf(boolean)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #insert(int,String) inserted} into this character
+ * sequence at the indicated offset.
* <p>
- * The offset argument must be greater than or equal to
- * <code>0</code>, and less than or equal to the length of this
- * sequence.
+ * The [EMAIL PROTECTED] offset} argument must be greater than or equal to
[EMAIL PROTECTED] 0},
+ * and less than or equal to the [EMAIL PROTECTED] #length()} of this
sequence.
*
* @param offset the offset.
- * @param b a <code>boolean</code>.
+ * @param b a [EMAIL PROTECTED] boolean}.
* @return a reference to this object.
* @throws StringIndexOutOfBoundsException if the offset is invalid.
*/
@@ -1140,25 +1146,20 @@
}
/**
- * Inserts the string representation of the <code>char</code>
+ * Inserts the string representation of the [EMAIL PROTECTED] char}
* argument into this sequence.
* <p>
- * The second argument is inserted into the contents of this sequence
- * at the position indicated by <code>offset</code>. The length
- * of this sequence increases by one.
+ * The overall effect is exactly as if the second argument were
+ * converted to a string by the method [EMAIL PROTECTED]
String#valueOf(char)},
+ * and the character in that string were then
+ * [EMAIL PROTECTED] #insert(int,String) inserted} into this character
+ * sequence at the indicated offset.
* <p>
- * The overall effect is exactly as if the argument were converted to
- * a string by the method [EMAIL PROTECTED] String#valueOf(char)} and the
character
- * in that string were then [EMAIL PROTECTED] #insert(int, String)
inserted} into
- * this character sequence at the position indicated by
- * <code>offset</code>.
- * <p>
- * The offset argument must be greater than or equal to
- * <code>0</code>, and less than or equal to the length of this
- * sequence.
+ * The [EMAIL PROTECTED] offset} argument must be greater than or equal to
[EMAIL PROTECTED] 0},
+ * and less than or equal to the [EMAIL PROTECTED] #length()} of this
sequence.
*
* @param offset the offset.
- * @param c a <code>char</code>.
+ * @param c a [EMAIL PROTECTED] char}.
* @return a reference to this object.
* @throws IndexOutOfBoundsException if the offset is invalid.
*/
@@ -1173,20 +1174,20 @@
}
/**
- * Inserts the string representation of the second <code>int</code>
+ * Inserts the string representation of the second [EMAIL PROTECTED] int}
* argument into this sequence.
* <p>
- * The second argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then inserted into this sequence at the indicated
- * offset.
+ * The overall effect is exactly as if the second argument were
+ * converted to a string by the method [EMAIL PROTECTED]
String#valueOf(int)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #insert(int,String) inserted} into this character
+ * sequence at the indicated offset.
* <p>
- * The offset argument must be greater than or equal to
- * <code>0</code>, and less than or equal to the length of this
- * sequence.
+ * The [EMAIL PROTECTED] offset} argument must be greater than or equal to
[EMAIL PROTECTED] 0},
+ * and less than or equal to the [EMAIL PROTECTED] #length()} of this
sequence.
*
* @param offset the offset.
- * @param i an <code>int</code>.
+ * @param i an [EMAIL PROTECTED] int}.
* @return a reference to this object.
* @throws StringIndexOutOfBoundsException if the offset is invalid.
*/
@@ -1195,20 +1196,20 @@
}
/**
- * Inserts the string representation of the <code>long</code>
+ * Inserts the string representation of the [EMAIL PROTECTED] long}
* argument into this sequence.
* <p>
- * The second argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then inserted into this sequence at the position
- * indicated by <code>offset</code>.
+ * The overall effect is exactly as if the second argument were
+ * converted to a string by the method [EMAIL PROTECTED]
String#valueOf(long)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #insert(int,String) inserted} into this character
+ * sequence at the indicated offset.
* <p>
- * The offset argument must be greater than or equal to
- * <code>0</code>, and less than or equal to the length of this
- * sequence.
+ * The [EMAIL PROTECTED] offset} argument must be greater than or equal to
[EMAIL PROTECTED] 0},
+ * and less than or equal to the [EMAIL PROTECTED] #length()} of this
sequence.
*
* @param offset the offset.
- * @param l a <code>long</code>.
+ * @param l a [EMAIL PROTECTED] long}.
* @return a reference to this object.
* @throws StringIndexOutOfBoundsException if the offset is invalid.
*/
@@ -1217,20 +1218,20 @@
}
/**
- * Inserts the string representation of the <code>float</code>
+ * Inserts the string representation of the [EMAIL PROTECTED] float}
* argument into this sequence.
* <p>
- * The second argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then inserted into this sequence at the indicated
- * offset.
+ * The overall effect is exactly as if the second argument were
+ * converted to a string by the method [EMAIL PROTECTED]
String#valueOf(float)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #insert(int,String) inserted} into this character
+ * sequence at the indicated offset.
* <p>
- * The offset argument must be greater than or equal to
- * <code>0</code>, and less than or equal to the length of this
- * sequence.
+ * The [EMAIL PROTECTED] offset} argument must be greater than or equal to
[EMAIL PROTECTED] 0},
+ * and less than or equal to the [EMAIL PROTECTED] #length()} of this
sequence.
*
* @param offset the offset.
- * @param f a <code>float</code>.
+ * @param f a [EMAIL PROTECTED] float}.
* @return a reference to this object.
* @throws StringIndexOutOfBoundsException if the offset is invalid.
*/
@@ -1239,20 +1240,20 @@
}
/**
- * Inserts the string representation of the <code>double</code>
+ * Inserts the string representation of the [EMAIL PROTECTED] double}
* argument into this sequence.
* <p>
- * The second argument is converted to a string as if by the method
- * <code>String.valueOf</code>, and the characters of that
- * string are then inserted into this sequence at the indicated
- * offset.
+ * The overall effect is exactly as if the second argument were
+ * converted to a string by the method [EMAIL PROTECTED]
String#valueOf(double)},
+ * and the characters of that string were then
+ * [EMAIL PROTECTED] #insert(int,String) inserted} into this character
+ * sequence at the indicated offset.
* <p>
- * The offset argument must be greater than or equal to
- * <code>0</code>, and less than or equal to the length of this
- * sequence.
+ * The [EMAIL PROTECTED] offset} argument must be greater than or equal to
[EMAIL PROTECTED] 0},
+ * and less than or equal to the [EMAIL PROTECTED] #length()} of this
sequence.
*
* @param offset the offset.
- * @param d a <code>double</code>.
+ * @param d a [EMAIL PROTECTED] double}.
* @return a reference to this object.
* @throws StringIndexOutOfBoundsException if the offset is invalid.
*/
diff --git a/src/share/classes/java/lang/StringBuffer.java
b/src/share/classes/java/lang/StringBuffer.java
--- a/src/share/classes/java/lang/StringBuffer.java
+++ b/src/share/classes/java/lang/StringBuffer.java
@@ -212,7 +212,7 @@
* @throws NullPointerException [EMAIL PROTECTED]
* @throws IndexOutOfBoundsException [EMAIL PROTECTED]
*/
- public synchronized void getChars(int srcBegin, int srcEnd, char dst[],
+ public synchronized void getChars(int srcBegin, int srcEnd, char[] dst,
int dstBegin)
{
super.getChars(srcBegin, srcEnd, dst, dstBegin);
@@ -228,10 +228,6 @@
value[index] = ch;
}
- /**
- * @see java.lang.String#valueOf(java.lang.Object)
- * @see #append(java.lang.String)
- */
public synchronized StringBuffer append(Object obj) {
super.append(String.valueOf(obj));
return this;
@@ -314,7 +310,7 @@
return this;
}
- public synchronized StringBuffer append(char str[]) {
+ public synchronized StringBuffer append(char[] str) {
super.append(str);
return this;
}
@@ -322,15 +318,11 @@
/**
* @throws IndexOutOfBoundsException [EMAIL PROTECTED]
*/
- public synchronized StringBuffer append(char str[], int offset, int len) {
+ public synchronized StringBuffer append(char[] str, int offset, int len) {
super.append(str, offset, len);
return this;
}
- /**
- * @see java.lang.String#valueOf(boolean)
- * @see #append(java.lang.String)
- */
public synchronized StringBuffer append(boolean b) {
super.append(b);
return this;
@@ -341,10 +333,6 @@
return this;
}
- /**
- * @see java.lang.String#valueOf(int)
- * @see #append(java.lang.String)
- */
public synchronized StringBuffer append(int i) {
super.append(i);
return this;
@@ -358,28 +346,16 @@
return this;
}
- /**
- * @see java.lang.String#valueOf(long)
- * @see #append(java.lang.String)
- */
public synchronized StringBuffer append(long lng) {
super.append(lng);
return this;
}
- /**
- * @see java.lang.String#valueOf(float)
- * @see #append(java.lang.String)
- */
public synchronized StringBuffer append(float f) {
super.append(f);
return this;
}
- /**
- * @see java.lang.String#valueOf(double)
- * @see #append(java.lang.String)
- */
public synchronized StringBuffer append(double d) {
super.append(d);
return this;
@@ -440,7 +416,7 @@
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
* @since 1.2
*/
- public synchronized StringBuffer insert(int index, char str[], int offset,
+ public synchronized StringBuffer insert(int index, char[] str, int offset,
int len)
{
super.insert(index, str, offset, len);
@@ -449,9 +425,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(java.lang.Object)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public synchronized StringBuffer insert(int offset, Object obj) {
super.insert(offset, String.valueOf(obj));
@@ -460,7 +433,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see #length()
*/
public synchronized StringBuffer insert(int offset, String str) {
super.insert(offset, str);
@@ -470,7 +442,7 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
*/
- public synchronized StringBuffer insert(int offset, char str[]) {
+ public synchronized StringBuffer insert(int offset, char[] str) {
super.insert(offset, str);
return this;
}
@@ -501,9 +473,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(boolean)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public StringBuffer insert(int offset, boolean b) {
return insert(offset, String.valueOf(b));
@@ -511,7 +480,6 @@
/**
* @throws IndexOutOfBoundsException [EMAIL PROTECTED]
- * @see #length()
*/
public synchronized StringBuffer insert(int offset, char c) {
super.insert(offset, c);
@@ -520,9 +488,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(int)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public StringBuffer insert(int offset, int i) {
return insert(offset, String.valueOf(i));
@@ -530,9 +495,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(long)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public StringBuffer insert(int offset, long l) {
return insert(offset, String.valueOf(l));
@@ -540,9 +502,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(float)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public StringBuffer insert(int offset, float f) {
return insert(offset, String.valueOf(f));
@@ -550,9 +509,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(double)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public StringBuffer insert(int offset, double d) {
return insert(offset, String.valueOf(d));
diff --git a/src/share/classes/java/lang/StringBuilder.java
b/src/share/classes/java/lang/StringBuilder.java
--- a/src/share/classes/java/lang/StringBuilder.java
+++ b/src/share/classes/java/lang/StringBuilder.java
@@ -124,10 +124,6 @@
append(seq);
}
- /**
- * @see java.lang.String#valueOf(java.lang.Object)
- * @see #append(java.lang.String)
- */
public StringBuilder append(Object obj) {
return append(String.valueOf(obj));
}
@@ -196,7 +192,7 @@
return this;
}
- public StringBuilder append(char str[]) {
+ public StringBuilder append(char[] str) {
super.append(str);
return this;
}
@@ -204,15 +200,11 @@
/**
* @throws IndexOutOfBoundsException [EMAIL PROTECTED]
*/
- public StringBuilder append(char str[], int offset, int len) {
+ public StringBuilder append(char[] str, int offset, int len) {
super.append(str, offset, len);
return this;
}
- /**
- * @see java.lang.String#valueOf(boolean)
- * @see #append(java.lang.String)
- */
public StringBuilder append(boolean b) {
super.append(b);
return this;
@@ -223,37 +215,21 @@
return this;
}
- /**
- * @see java.lang.String#valueOf(int)
- * @see #append(java.lang.String)
- */
public StringBuilder append(int i) {
super.append(i);
return this;
}
- /**
- * @see java.lang.String#valueOf(long)
- * @see #append(java.lang.String)
- */
public StringBuilder append(long lng) {
super.append(lng);
return this;
}
- /**
- * @see java.lang.String#valueOf(float)
- * @see #append(java.lang.String)
- */
public StringBuilder append(float f) {
super.append(f);
return this;
}
- /**
- * @see java.lang.String#valueOf(double)
- * @see #append(java.lang.String)
- */
public StringBuilder append(double d) {
super.append(d);
return this;
@@ -294,7 +270,7 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
*/
- public StringBuilder insert(int index, char str[], int offset,
+ public StringBuilder insert(int index, char[] str, int offset,
int len)
{
super.insert(index, str, offset, len);
@@ -303,9 +279,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(java.lang.Object)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public StringBuilder insert(int offset, Object obj) {
return insert(offset, String.valueOf(obj));
@@ -313,7 +286,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see #length()
*/
public StringBuilder insert(int offset, String str) {
super.insert(offset, str);
@@ -323,7 +295,7 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
*/
- public StringBuilder insert(int offset, char str[]) {
+ public StringBuilder insert(int offset, char[] str) {
super.insert(offset, str);
return this;
}
@@ -351,9 +323,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(boolean)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public StringBuilder insert(int offset, boolean b) {
super.insert(offset, b);
@@ -362,7 +331,6 @@
/**
* @throws IndexOutOfBoundsException [EMAIL PROTECTED]
- * @see #length()
*/
public StringBuilder insert(int offset, char c) {
super.insert(offset, c);
@@ -371,9 +339,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(int)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public StringBuilder insert(int offset, int i) {
return insert(offset, String.valueOf(i));
@@ -381,9 +346,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(long)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public StringBuilder insert(int offset, long l) {
return insert(offset, String.valueOf(l));
@@ -391,9 +353,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(float)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public StringBuilder insert(int offset, float f) {
return insert(offset, String.valueOf(f));
@@ -401,9 +360,6 @@
/**
* @throws StringIndexOutOfBoundsException [EMAIL PROTECTED]
- * @see java.lang.String#valueOf(double)
- * @see #insert(int, java.lang.String)
- * @see #length()
*/
public StringBuilder insert(int offset, double d) {
return insert(offset, String.valueOf(d));