Makefile.am: Add new classes

* Makefile.am: Add new classes
	(core_java_source_files): CharSequence
	(ordinary_java_source_files): Authenticator, PasswordAuthentication
	* Makefile.in: regenerate
	* gcj/javaprims.h: ditto
	* java/lang/CharSequence: new class from Classpath
	* java/lang/String.java: implements CharSequence
	(subSequence (int,int)): new method
	* java/lang/SubString.java: implements CharSequence
	(subSequence (int,int)): new method
	remerge comments with Classpath
	* java/net/Authenticator.java: new class from Classpath
	* java/net/PasswordAuthentication.java: ditto

From-SVN: r45969
This commit is contained in:
Mark Wielaard 2001-10-02 20:59:31 +00:00 committed by Mark Wielaard
parent da5c0f6ef5
commit 627a8b878e
9 changed files with 572 additions and 54 deletions

View file

@ -22,7 +22,7 @@ import java.util.Locale;
* Status: Complete to 1.3.
*/
public final class String implements Serializable, Comparable
public final class String implements Serializable, Comparable, CharSequence
{
private Object data;
private int boffset; // Note this is a byte offset - don't use in Java code!
@ -297,6 +297,28 @@ public final class String implements Serializable, Comparable
}
}
/**
* Creates a substring of this String, starting at a specified index
* and ending at one character before a specified index.
* <p>
* To implement <code>CharSequence</code>.
* Calls <code>substring(beginIndex, endIndex)</code>.
*
* @param beginIndex index to start substring (base 0)
* @param endIndex index after the last character to be
* copied into the substring
*
* @return new String which is a substring of this String
*
* @exception StringIndexOutOfBoundsException
* if (beginIndex < 0 || endIndex > this.length() || beginIndex > endIndex)
*/
public CharSequence subSequence(int beginIndex, int endIndex)
throws IndexOutOfBoundsException
{
return substring(beginIndex, endIndex);
}
public String substring (int beginIndex)
{
return substring (beginIndex, count);