AbstractMethodError.java: Re-merged with Classpath.
* java/lang/AbstractMethodError.java: Re-merged with Classpath. * java/lang/ArithmeticException.java: Likewise. * java/lang/ArrayIndexOutOfBoundsException.java: Likewise. * java/lang/ArrayStoreException.java: Likewise. * java/lang/Byte.java: Likewise. * java/lang/CharSequence.java: Likewise. * java/lang/ClassCastException.java: Likewise. * java/lang/ClassCircularityError.java: Likewise. * java/lang/ClassFormatError.java: Likewise. * java/lang/CloneNotSupportedException.java: Likewise. * java/lang/Cloneable.java: Likewise. * java/lang/Comparable.java: Likewise. * java/lang/Compiler.java: Likewise. * java/lang/Error.java: Likewise. * java/lang/ExceptionInInitializerError.java: Likewise. * java/lang/IllegalAccessError.java: Likewise. * java/lang/IllegalAccessException.java: Likewise. * java/lang/IllegalArgumentException.java: Likewise. * java/lang/IllegalMonitorStateException.java: Likewise. * java/lang/IllegalStateException.java: Likewise. * java/lang/IllegalThreadStateException.java: Likewise. * java/lang/IncompatibleClassChangeError.java: Likewise. * java/lang/IndexOutOfBoundsException.java: Likewise. * java/lang/InheritableThreadLocal.java: Likewise. * java/lang/InstantiationError.java: Likewise. * java/lang/InstantiationException.java: Likewise. * java/lang/InternalError.java: Likewise. * java/lang/InterruptedException.java: Likewise. * java/lang/LinkageError.java: Likewise. * java/lang/NegativeArraySizeException.java: Likewise. * java/lang/NoClassDefFoundError.java: Likewise. * java/lang/NoSuchFieldError.java: Likewise. * java/lang/NoSuchFieldException.java: Likewise. * java/lang/NoSuchMethodError.java: Likewise. * java/lang/NoSuchMethodException.java: Likewise. * java/lang/NullPointerException.java: Likewise. * java/lang/NumberFormatException.java: Likewise. * java/lang/OutOfMemoryError.java: Likewise. * java/lang/Process.java: Likewise. * java/lang/Runnable.java: Likewise. * java/lang/RuntimePermission.java: Likewise. * java/lang/SecurityException.java: Likewise. * java/lang/Short.java: Likewise. * java/lang/StackOverflowError.java: Likewise. * java/lang/StringIndexOutOfBoundsException.java: Likewise. * java/lang/ThreadDeath.java: Likewise. * java/lang/ThreadLocal.java: Likewise. * java/lang/UnknownError.java: Likewise. * java/lang/UnsatisfiedLinkError.java: Likewise. * java/lang/UnsupportedClassVersionError.java: Likewise. * java/lang/UnsupportedOperationException.java: Likewise. * java/lang/VerifyError.java: Likewise. * java/lang/VirtualMachineError.java: Likewise. * java/lang/reflect/InvocationTargetException.java: Likewise. * java/net/BindException.java: Likewise. * java/net/ConnectException.java: Likewise. * java/net/MalformedURLException.java: Likewise. * java/net/NoRouteToHostException.java: Likewise. * java/net/ProtocolException.java: Likewise. * java/net/SocketException.java: Likewise. * java/net/UnknownHostException.java: Likewise. * java/net/UnknownServiceException.java: Likewise. From-SVN: r54656
This commit is contained in:
parent
34442f32a2
commit
3e1b181a67
63 changed files with 2168 additions and 2216 deletions
|
@ -1,5 +1,5 @@
|
|||
/* java.lang.CharSequence -- Anything that has an indexed sequence of chars
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
/* CharSequence.java -- Anything that has an indexed sequence of chars
|
||||
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
|
|||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
|
||||
GNU Classpath is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
|
@ -44,8 +44,8 @@ package java.lang;
|
|||
* <code>CharBuffer</code> to give a uniform way to get chars at a certain
|
||||
* index, the number of characters in the sequence and a subrange of the
|
||||
* chars. Indexes start at 0 and the last index is <code>length()-1</code>.
|
||||
* <p>
|
||||
* Even when classes implement this interface they are not always
|
||||
*
|
||||
* <p>Even when classes implement this interface they are not always
|
||||
* exchangeble because they might implement their compare, equals or hash
|
||||
* function differently. This means that in general one should not use a
|
||||
* <code>CharSequence</code> as keys in collections since two sequences
|
||||
|
@ -54,38 +54,46 @@ package java.lang;
|
|||
* represented by different classes.
|
||||
*
|
||||
* @author Mark Wielaard (mark@klomp.org)
|
||||
*
|
||||
* @since 1.4
|
||||
* @status updated to 1.4
|
||||
*/
|
||||
public interface CharSequence
|
||||
{
|
||||
/**
|
||||
* Returns the character at the given index.
|
||||
*
|
||||
* @param i the index to retrieve from
|
||||
* @return the character at that location
|
||||
* @throws IndexOutOfBoundsException if i < 0 || i >= length() - 1
|
||||
*/
|
||||
char charAt(int i);
|
||||
|
||||
public interface CharSequence {
|
||||
/**
|
||||
* Returns the length of the sequence. This is the number of 16-bit
|
||||
* characters in the sequence, which may differ from the length of the
|
||||
* underlying encoding.
|
||||
*
|
||||
* @return the sequence length
|
||||
*/
|
||||
int length();
|
||||
|
||||
/**
|
||||
* Returns the character at the given index.
|
||||
*
|
||||
* @exception IndexOutOfBoundsException when <code>i < 0</code> or
|
||||
* <code>i > length()-1</code>.
|
||||
*/
|
||||
char charAt(int i);
|
||||
/**
|
||||
* Returns a new <code>CharSequence</char> of the indicated range.
|
||||
*
|
||||
* @param begin the start index (inclusive)
|
||||
* @param end the end index (exclusive)
|
||||
* @return a subsequence of this
|
||||
* @throws IndexOutOfBoundsException if begin > end || begin < 0 ||
|
||||
* end > length()
|
||||
*/
|
||||
CharSequence subSequence(int begin, int end);
|
||||
|
||||
/**
|
||||
* Returns the length of the sequence.
|
||||
*/
|
||||
int length();
|
||||
|
||||
/**
|
||||
* Returns a new <code>CharSequence</char> of the indicated range.
|
||||
*
|
||||
* @exception IndexOutOfBoundsException when <code>begin < 0</code>,
|
||||
* <code>end < 0</code>, <code>end > length()</code> or
|
||||
* <code>begin > end</code>
|
||||
*/
|
||||
CharSequence subSequence(int begin, int end);
|
||||
|
||||
/**
|
||||
* Returns the complete <code>CharSequence</code> as a <code>String</code>.
|
||||
* Classes that implement this interface should return a <code>String</code>
|
||||
* which contains only the characters in the sequence in the correct order.
|
||||
*/
|
||||
String toString();
|
||||
/**
|
||||
* Returns the complete <code>CharSequence</code> as a <code>String</code>.
|
||||
* Classes that implement this interface should return a <code>String</code>
|
||||
* which contains only the characters in the sequence in the correct order.
|
||||
*
|
||||
* @return the character sequence as a String
|
||||
*/
|
||||
String toString();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue