package java.lang;
-import java.io.UnsupportedEncodingException;
import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
import java.lang.Comparable;
import java.util.Comparator;
import java.util.Locale;
* literal in the object stream.
*
* @author Paul N. Fisher
- * @author Eric Blake <ebb9@email.byu.edu>
- * @author Per Bothner <bothner@cygnus.com>
+ * @author Eric Blake (ebb9@email.byu.edu)
+ * @author Per Bothner (bothner@cygnus.com)
* @since 1.0
* @status updated to 1.4
*/
* @param count the number of characters from data to copy
* @throws NullPointerException if data is null
* @throws IndexOutOfBoundsException if (offset < 0 || count < 0
- * || offset + count > data.length)
+ * || offset + count > data.length)
* (while unspecified, this is a StringIndexOutOfBoundsException)
*/
public String(char[] data, int offset, int count)
* corresponding byte b, is created in the new String as if by performing:
*
* <pre>
- * c = (char) (((hibyte & 0xff) << 8) | (b & 0xff))
+ * c = (char) (((hibyte & 0xff) << 8) | (b & 0xff))
* </pre>
*
* @param ascii array of integer values
* @param count the number of characters from ascii to copy
* @throws NullPointerException if ascii is null
* @throws IndexOutOfBoundsException if (offset < 0 || count < 0
- * || offset + count > ascii.length)
+ * || offset + count > ascii.length)
* (while unspecified, this is a StringIndexOutOfBoundsException)
* @see #String(byte[])
* @see #String(byte[], String)
* as if by performing:
*
* <pre>
- * c = (char) (((hibyte & 0xff) << 8) | (b & 0xff))
+ * c = (char) (((hibyte & 0xff) << 8) | (b & 0xff))
* </pre>
*
* @param ascii array of integer values
* character of the string. This is unsatisfactory for locale-based
* comparison, in which case you should use {@link java.text.Collator}.
*
- * @param s the string to compare against
+ * @param str the string to compare against
* @return the comparison
* @see Collator#compare(String, String)
* @since 1.2
*
* @param toffset index to start comparison at for this String
* @param other String to compare region to this String
- * @param oofset index to start comparison at for other
+ * @param ooffset index to start comparison at for other
* @param len number of characters to compare
* @return true if regions match (case sensitive)
* @throws NullPointerException if other is null
* Predicate which determines if this String starts with a given prefix.
* If the prefix is an empty String, true is returned.
*
- * @param prefex String to compare
+ * @param prefix String to compare
* @return true if this String starts with the prefix
* @throws NullPointerException if prefix is null
* @see #startsWith(String, int)
* @param end index to end at (exclusive)
* @return new String which is a substring of this String
* @throws IndexOutOfBoundsException if begin < 0 || end > length()
- * || begin > end (while unspecified, this is a
+ * || begin > end (while unspecified, this is a
* StringIndexOutOfBoundsException)
*/
- public native String substring(int beginIndex, int endIndex);
+ public native String substring(int begin, int end);
/**
* Creates a substring of this String, starting at a specified index
* and ending at one character before a specified index. This behaves like
- * <code>substring(beginIndex, endIndex)</code>.
+ * <code>substring(begin, end)</code>.
*
- * @param beginIndex index to start substring (inclusive, base 0)
- * @param endIndex index to end at (exclusive)
+ * @param begin index to start substring (inclusive, base 0)
+ * @param end index to end at (exclusive)
* @return new String which is a substring of this String
* @throws IndexOutOfBoundsException if begin < 0 || end > length()
- * || begin > end
+ * || begin > end
* @since 1.4
*/
- public CharSequence subSequence(int beginIndex, int endIndex)
+ public CharSequence subSequence(int begin, int end)
{
- return substring(beginIndex, endIndex);
+ return substring(begin, end);
}
/**
* @return String containing the chars from data[offset..offset+count]
* @throws NullPointerException if data is null
* @throws IndexOutOfBoundsException if (offset < 0 || count < 0
- * || offset + count > data.length)
+ * || offset + count > data.length)
* (while unspecified, this is a StringIndexOutOfBoundsException)
* @see #String(char[], int, int)
*/
* @return String containing the chars from data[offset..offset+count]
* @throws NullPointerException if data is null
* @throws IndexOutOfBoundsException if (offset < 0 || count < 0
- * || offset + count > data.length)
+ * || offset + count > data.length)
* (while unspecified, this is a StringIndexOutOfBoundsException)
* @see #String(char[], int, int)
*/