You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by nd...@apache.org on 2006/08/20 22:54:31 UTC
svn commit: r433041 [1/13] - in
/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang:
./ ref/ reflect/
Author: ndbeyer
Date: Sun Aug 20 13:54:27 2006
New Revision: 433041
URL: http://svn.apache.org/viewvc?rev=433041&view=rev
Log:
Set svn:eol-style = native for java.lang.** in luni
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AbstractMethodError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Appendable.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArithmeticException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayStoreException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AssertionError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Boolean.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Byte.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CharSequence.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCastException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCircularityError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassFormatError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CloneNotSupportedException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Cloneable.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Comparable.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Double.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/EnumConstantNotPresentException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Error.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Exception.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Float.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/IllegalAccessError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/IllegalAccessException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/IllegalArgumentException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/IllegalMonitorStateException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/IllegalStateException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/IllegalThreadStateException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/IncompatibleClassChangeError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/IndexOutOfBoundsException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/InheritableThreadLocal.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/InstantiationError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/InstantiationException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Integer.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/InternalError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/InterruptedException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Iterable.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/LinkageError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Long.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Math.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/NegativeArraySizeException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/NoClassDefFoundError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/NoSuchFieldError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/NoSuchFieldException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/NoSuchMethodError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/NoSuchMethodException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/NullPointerException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Number.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/NumberFormatException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/OutOfMemoryError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Process.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Readable.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Runnable.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/RuntimeException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/RuntimePermission.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/SecurityException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/SecurityManager.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Short.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StackOverflowError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StrictMath.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/String.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuffer.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuilder.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringIndexOutOfBoundsException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ThreadDeath.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ThreadLocal.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/UnknownError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/UnsatisfiedLinkError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/UnsupportedClassVersionError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/UnsupportedOperationException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/VerifyError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/VirtualMachineError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Void.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ref/ReferenceQueue.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/AnnotatedElement.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/GenericArrayType.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/GenericSignatureFormatError.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/InvocationHandler.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/InvocationTargetException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/MalformedParameterizedTypeException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Member.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Modifier.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/ParameterizedType.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Proxy.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/ReflectPermission.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/UndeclaredThrowableException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/WildcardType.java (contents, props changed)
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AbstractMethodError.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AbstractMethodError.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AbstractMethodError.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AbstractMethodError.java Sun Aug 20 13:54:27 2006
@@ -1,47 +1,47 @@
-/* Copyright 1998, 2002 The Apache Software Foundation or its licensors, as applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package java.lang;
-
-
-/**
- * This error is thrown when the VM notices that a an attempt is being made to
- * invoke an abstract method.
- * <p>
- * Note that this can only occur when inconsistant class files are being loaded,
- * since invoking an abstract method is a compile time error.
- */
-public class AbstractMethodError extends IncompatibleClassChangeError {
-
- private static final long serialVersionUID = -1654391082989018462L;
-
- /**
- * Constructs a new instance of this class with its walkback filled in.
- */
- public AbstractMethodError() {
- super();
- }
-
- /**
- * Constructs a new instance of this class with its walkback and message
- * filled in.
- *
- * @param detailMessage
- * String The detail message for the exception.
- */
- public AbstractMethodError(String detailMessage) {
- super(detailMessage);
- }
-}
+/* Copyright 1998, 2002 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+
+/**
+ * This error is thrown when the VM notices that a an attempt is being made to
+ * invoke an abstract method.
+ * <p>
+ * Note that this can only occur when inconsistant class files are being loaded,
+ * since invoking an abstract method is a compile time error.
+ */
+public class AbstractMethodError extends IncompatibleClassChangeError {
+
+ private static final long serialVersionUID = -1654391082989018462L;
+
+ /**
+ * Constructs a new instance of this class with its walkback filled in.
+ */
+ public AbstractMethodError() {
+ super();
+ }
+
+ /**
+ * Constructs a new instance of this class with its walkback and message
+ * filled in.
+ *
+ * @param detailMessage
+ * String The detail message for the exception.
+ */
+ public AbstractMethodError(String detailMessage) {
+ super(detailMessage);
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AbstractMethodError.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Appendable.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Appendable.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Appendable.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Appendable.java Sun Aug 20 13:54:27 2006
@@ -1,86 +1,86 @@
-/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package java.lang;
-
-import java.io.IOException;
-
-/**
- * Appendable is an object used to append character or character sequence. Any
- * class implements this interface can receive data formatted by
- * <code>Formatter</code>. The appended character or character sequence
- * should be valid accroding to the rules described
- * <code>Unicode Character Representation</code>.
- * <p>
- * Appendable itself does not gurantee thread safety. This responsibility is up
- * to the implementing class.</p>
- * <p>
- * The implementing class can choose different exception handling mechanism. It
- * can choose to throw exceptions other than IOException but which must be
- * compatible with IOException, or does not throw any exceptions at all and use
- * error code instead. All in all, the implementing class does not gurantee to
- * propagate the exception declared by this interface.</p>
- *
- */
-public interface Appendable {
-
- /**
- * Append the given character.
- *
- * @param c the character to append
- * @return this <code>Appendable</code>
- * @throws IOException if some I/O operation fails
- */
- Appendable append(char c) throws IOException;
-
- /**
- * Append the given <code>CharSequence</code>.
- * <p>
- * The behaviour of this method depends on the implementation class of
- * <code>Appendable</code>.</p>
- * <p>
- * If the give <code>CharSequence</code> is null, the sequence is treated as
- * String "null".</p>
- *
- * @param csq the <code>CharSequence</code> to be append
- * @return this <code>Appendable</code>
- * @throws IOException if some I/O operation fails
- */
- Appendable append(CharSequence csq) throws IOException;
-
- /**
- * Append part of the given <code>CharSequence</code>.
- * <p>
- * If the given <code>CharSequence</code> is not null, this method behaves
- * same as the following statement:</p>
- * <pre> out.append(csq.subSequence(start, end)) </pre>
- * <p>
- * If the give <code>CharSequence</code> is null, the sequence is treated as
- * String "null".</p>
- *
- * @param csq the <code>CharSequence</code> to be append
- * @param start the index to spicify the start position of
- * <code>CharSequence</code> to be append, must be non-negative,
- * and not larger than the end
- * @param end the index to speicify the end position of
- * <code>CharSequence</code> to be append, must be non-negative,
- * and not larger than the size of csq
- * @return this <code>Appendable</code>
- * @throws IOException if some I/O operation fails
- * @throws IndexOutOfBoundsException
- * if the start or end is illegal
- */
- Appendable append(CharSequence csq, int start, int end) throws IOException;
-}
+/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+import java.io.IOException;
+
+/**
+ * Appendable is an object used to append character or character sequence. Any
+ * class implements this interface can receive data formatted by
+ * <code>Formatter</code>. The appended character or character sequence
+ * should be valid accroding to the rules described
+ * <code>Unicode Character Representation</code>.
+ * <p>
+ * Appendable itself does not gurantee thread safety. This responsibility is up
+ * to the implementing class.</p>
+ * <p>
+ * The implementing class can choose different exception handling mechanism. It
+ * can choose to throw exceptions other than IOException but which must be
+ * compatible with IOException, or does not throw any exceptions at all and use
+ * error code instead. All in all, the implementing class does not gurantee to
+ * propagate the exception declared by this interface.</p>
+ *
+ */
+public interface Appendable {
+
+ /**
+ * Append the given character.
+ *
+ * @param c the character to append
+ * @return this <code>Appendable</code>
+ * @throws IOException if some I/O operation fails
+ */
+ Appendable append(char c) throws IOException;
+
+ /**
+ * Append the given <code>CharSequence</code>.
+ * <p>
+ * The behaviour of this method depends on the implementation class of
+ * <code>Appendable</code>.</p>
+ * <p>
+ * If the give <code>CharSequence</code> is null, the sequence is treated as
+ * String "null".</p>
+ *
+ * @param csq the <code>CharSequence</code> to be append
+ * @return this <code>Appendable</code>
+ * @throws IOException if some I/O operation fails
+ */
+ Appendable append(CharSequence csq) throws IOException;
+
+ /**
+ * Append part of the given <code>CharSequence</code>.
+ * <p>
+ * If the given <code>CharSequence</code> is not null, this method behaves
+ * same as the following statement:</p>
+ * <pre> out.append(csq.subSequence(start, end)) </pre>
+ * <p>
+ * If the give <code>CharSequence</code> is null, the sequence is treated as
+ * String "null".</p>
+ *
+ * @param csq the <code>CharSequence</code> to be append
+ * @param start the index to spicify the start position of
+ * <code>CharSequence</code> to be append, must be non-negative,
+ * and not larger than the end
+ * @param end the index to speicify the end position of
+ * <code>CharSequence</code> to be append, must be non-negative,
+ * and not larger than the size of csq
+ * @return this <code>Appendable</code>
+ * @throws IOException if some I/O operation fails
+ * @throws IndexOutOfBoundsException
+ * if the start or end is illegal
+ */
+ Appendable append(CharSequence csq, int start, int end) throws IOException;
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Appendable.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArithmeticException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArithmeticException.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArithmeticException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArithmeticException.java Sun Aug 20 13:54:27 2006
@@ -1,44 +1,44 @@
-/* Copyright 1998, 2002 The Apache Software Foundation or its licensors, as applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package java.lang;
-
-
-/**
- * This runtime exception is thrown when the an invalid arithmetic operation is
- * attempted.
- */
-public class ArithmeticException extends RuntimeException {
-
- private static final long serialVersionUID = 2256477558314496007L;
-
- /**
- * Constructs a new instance of this class with its walkback filled in.
- */
- public ArithmeticException() {
- super();
- }
-
- /**
- * Constructs a new instance of this class with its walkback and message
- * filled in.
- *
- * @param detailMessage
- * String The detail message for the exception.
- */
- public ArithmeticException(String detailMessage) {
- super(detailMessage);
- }
-}
+/* Copyright 1998, 2002 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+
+/**
+ * This runtime exception is thrown when the an invalid arithmetic operation is
+ * attempted.
+ */
+public class ArithmeticException extends RuntimeException {
+
+ private static final long serialVersionUID = 2256477558314496007L;
+
+ /**
+ * Constructs a new instance of this class with its walkback filled in.
+ */
+ public ArithmeticException() {
+ super();
+ }
+
+ /**
+ * Constructs a new instance of this class with its walkback and message
+ * filled in.
+ *
+ * @param detailMessage
+ * String The detail message for the exception.
+ */
+ public ArithmeticException(String detailMessage) {
+ super(detailMessage);
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArithmeticException.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java Sun Aug 20 13:54:27 2006
@@ -1,58 +1,58 @@
-/* Copyright 1998, 2004 The Apache Software Foundation or its licensors, as applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package java.lang;
-
-
-import org.apache.harmony.luni.util.Msg;
-
-/**
- * This runtime exception is thrown when the an array is indexed with a value
- * less than zero, or greater than or equal to the size of the array.
- */
-public class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException {
-
- private static final long serialVersionUID = -5116101128118950844L;
-
- /**
- * Constructs a new instance of this class with its walkback filled in.
- */
- public ArrayIndexOutOfBoundsException() {
- super();
- }
-
- /**
- * Constructs a new instance of this class with its walkback and message
- * (which is based on the argument which is the index which failed) filled
- * in.
- *
- * @param index
- * int the offending index.
- */
- public ArrayIndexOutOfBoundsException(int index) {
- super(Msg.getString("K0052", index));
- }
-
- /**
- * Constructs a new instance of this class with its walkback and message
- * filled in.
- *
- * @param detailMessage
- * String The detail message for the exception.
- */
- public ArrayIndexOutOfBoundsException(String detailMessage) {
- super(detailMessage);
- }
-}
+/* Copyright 1998, 2004 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+
+import org.apache.harmony.luni.util.Msg;
+
+/**
+ * This runtime exception is thrown when the an array is indexed with a value
+ * less than zero, or greater than or equal to the size of the array.
+ */
+public class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException {
+
+ private static final long serialVersionUID = -5116101128118950844L;
+
+ /**
+ * Constructs a new instance of this class with its walkback filled in.
+ */
+ public ArrayIndexOutOfBoundsException() {
+ super();
+ }
+
+ /**
+ * Constructs a new instance of this class with its walkback and message
+ * (which is based on the argument which is the index which failed) filled
+ * in.
+ *
+ * @param index
+ * int the offending index.
+ */
+ public ArrayIndexOutOfBoundsException(int index) {
+ super(Msg.getString("K0052", index));
+ }
+
+ /**
+ * Constructs a new instance of this class with its walkback and message
+ * filled in.
+ *
+ * @param detailMessage
+ * String The detail message for the exception.
+ */
+ public ArrayIndexOutOfBoundsException(String detailMessage) {
+ super(detailMessage);
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayStoreException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayStoreException.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayStoreException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayStoreException.java Sun Aug 20 13:54:27 2006
@@ -1,44 +1,44 @@
-/* Copyright 1998, 2002 The Apache Software Foundation or its licensors, as applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package java.lang;
-
-
-/**
- * This runtime exception is thrown when a program attempts to store into an
- * array an element of a a type which the array can not hold..
- */
-public class ArrayStoreException extends RuntimeException {
-
- private static final long serialVersionUID = -4522193890499838241L;
-
- /**
- * Constructs a new instance of this class with its walkback filled in.
- */
- public ArrayStoreException() {
- super();
- }
-
- /**
- * Constructs a new instance of this class with its walkback and message
- * filled in.
- *
- * @param detailMessage
- * String The detail message for the exception.
- */
- public ArrayStoreException(String detailMessage) {
- super(detailMessage);
- }
-}
+/* Copyright 1998, 2002 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+
+/**
+ * This runtime exception is thrown when a program attempts to store into an
+ * array an element of a a type which the array can not hold..
+ */
+public class ArrayStoreException extends RuntimeException {
+
+ private static final long serialVersionUID = -4522193890499838241L;
+
+ /**
+ * Constructs a new instance of this class with its walkback filled in.
+ */
+ public ArrayStoreException() {
+ super();
+ }
+
+ /**
+ * Constructs a new instance of this class with its walkback and message
+ * filled in.
+ *
+ * @param detailMessage
+ * String The detail message for the exception.
+ */
+ public ArrayStoreException(String detailMessage) {
+ super(detailMessage);
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ArrayStoreException.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AssertionError.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AssertionError.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AssertionError.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AssertionError.java Sun Aug 20 13:54:27 2006
@@ -1,128 +1,128 @@
-/*
- * Copyright 2002, 2004 The Apache Software Foundation or its licensors, as
- * applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package java.lang;
-
-/**
- * <p>
- * Indicates that an assertion has failed.
- * </p>
- *
- * @since 1.4
- */
-public class AssertionError extends Error {
-
- private static final long serialVersionUID = -5013299493970297370L;
-
- /**
- * <p>
- * Constructs an instance without a message.
- * </p>
- */
- public AssertionError() {
- super();
- }
-
- /**
- * <p>
- * Constructs an instance with a message that is the
- * {@link String#valueOf(Object)} of the object passed. If the object passed
- * is an instanceof {@link Throwable}, then it also becomes the cause of
- * this error.
- * </p>
- *
- * @param detailMessage The value to be converted into the message and
- * optionally the cause.
- */
- public AssertionError(Object detailMessage) {
- super(String.valueOf(detailMessage),
- (detailMessage instanceof Throwable ? (Throwable) detailMessage
- : null));
- }
-
- /**
- * <p>
- * Constructs an instance with a message that is the
- * {@link String#valueOf(boolean)} of the boolean passed.
- * </p>
- *
- * @param detailMessage The value to be converted into the message.
- */
- public AssertionError(boolean detailMessage) {
- this(String.valueOf(detailMessage));
- }
-
- /**
- * <p>
- * Constructs an instance with a message that is the
- * {@link String#valueOf(char)} of the char passed.
- * </p>
- *
- * @param detailMessage The value to be converted into the message.
- */
- public AssertionError(char detailMessage) {
- this(String.valueOf(detailMessage));
- }
-
- /**
- * <p>
- * Constructs an instance with a message that is the
- * {@link String#valueOf(int)} of the int passed.
- * </p>
- *
- * @param detailMessage The value to be converted into the message.
- */
- public AssertionError(int detailMessage) {
- this(Integer.toString(detailMessage));
- }
-
- /**
- * <p>
- * Constructs an instance with a message that is the
- * {@link String#valueOf(long)} of the long passed.
- * </p>
- *
- * @param detailMessage The value to be converted into the message.
- */
- public AssertionError(long detailMessage) {
- this(Long.toString(detailMessage));
- }
-
- /**
- * <p>
- * Constructs an instance with a message that is the
- * {@link String#valueOf(float)} of the float passed.
- * </p>
- *
- * @param detailMessage The value to be converted into the message.
- */
- public AssertionError(float detailMessage) {
- this(Float.toString(detailMessage));
- }
-
- /**
- * <p>
- * Constructs an instance with a message that is the
- * {@link String#valueOf(double)} of the double passed.
- * </p>
- *
- * @param detailMessage The value to be converted into the message.
- */
- public AssertionError(double detailMessage) {
- this(Double.toString(detailMessage));
- }
-}
+/*
+ * Copyright 2002, 2004 The Apache Software Foundation or its licensors, as
+ * applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package java.lang;
+
+/**
+ * <p>
+ * Indicates that an assertion has failed.
+ * </p>
+ *
+ * @since 1.4
+ */
+public class AssertionError extends Error {
+
+ private static final long serialVersionUID = -5013299493970297370L;
+
+ /**
+ * <p>
+ * Constructs an instance without a message.
+ * </p>
+ */
+ public AssertionError() {
+ super();
+ }
+
+ /**
+ * <p>
+ * Constructs an instance with a message that is the
+ * {@link String#valueOf(Object)} of the object passed. If the object passed
+ * is an instanceof {@link Throwable}, then it also becomes the cause of
+ * this error.
+ * </p>
+ *
+ * @param detailMessage The value to be converted into the message and
+ * optionally the cause.
+ */
+ public AssertionError(Object detailMessage) {
+ super(String.valueOf(detailMessage),
+ (detailMessage instanceof Throwable ? (Throwable) detailMessage
+ : null));
+ }
+
+ /**
+ * <p>
+ * Constructs an instance with a message that is the
+ * {@link String#valueOf(boolean)} of the boolean passed.
+ * </p>
+ *
+ * @param detailMessage The value to be converted into the message.
+ */
+ public AssertionError(boolean detailMessage) {
+ this(String.valueOf(detailMessage));
+ }
+
+ /**
+ * <p>
+ * Constructs an instance with a message that is the
+ * {@link String#valueOf(char)} of the char passed.
+ * </p>
+ *
+ * @param detailMessage The value to be converted into the message.
+ */
+ public AssertionError(char detailMessage) {
+ this(String.valueOf(detailMessage));
+ }
+
+ /**
+ * <p>
+ * Constructs an instance with a message that is the
+ * {@link String#valueOf(int)} of the int passed.
+ * </p>
+ *
+ * @param detailMessage The value to be converted into the message.
+ */
+ public AssertionError(int detailMessage) {
+ this(Integer.toString(detailMessage));
+ }
+
+ /**
+ * <p>
+ * Constructs an instance with a message that is the
+ * {@link String#valueOf(long)} of the long passed.
+ * </p>
+ *
+ * @param detailMessage The value to be converted into the message.
+ */
+ public AssertionError(long detailMessage) {
+ this(Long.toString(detailMessage));
+ }
+
+ /**
+ * <p>
+ * Constructs an instance with a message that is the
+ * {@link String#valueOf(float)} of the float passed.
+ * </p>
+ *
+ * @param detailMessage The value to be converted into the message.
+ */
+ public AssertionError(float detailMessage) {
+ this(Float.toString(detailMessage));
+ }
+
+ /**
+ * <p>
+ * Constructs an instance with a message that is the
+ * {@link String#valueOf(double)} of the double passed.
+ * </p>
+ *
+ * @param detailMessage The value to be converted into the message.
+ */
+ public AssertionError(double detailMessage) {
+ this(Double.toString(detailMessage));
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/AssertionError.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Boolean.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Boolean.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Boolean.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Boolean.java Sun Aug 20 13:54:27 2006
@@ -1,226 +1,226 @@
-/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package java.lang;
-
-import java.io.Serializable;
-
-/**
- * <p>Boolean is the wrapper for the primitive type <code>boolean</code>.</p>
- * @since 1.0
- */
-public final class Boolean implements Serializable, Comparable<Boolean> {
-
- private static final long serialVersionUID = -3665804199014368530L;
-
- /**
- * The boolean value of the receiver.
- */
- private final boolean value;
-
- /**
- * The java.lang.Class that represents this class.
- */
- @SuppressWarnings("unchecked")
- public static final Class<Boolean> TYPE = (Class<Boolean>) new boolean[0]
- .getClass().getComponentType();
-
- // Note: This can't be set to "boolean.class", since *that* is
- // defined to be "java.lang.Boolean.TYPE";
-
- /**
- * The instance of the receiver which represents truth.
- */
- public static final Boolean TRUE = new Boolean(true);
-
- /**
- * The instance of the receiver which represents falsehood.
- */
- public static final Boolean FALSE = new Boolean(false);
-
- /**
- * Constructs a new instance of this class given a string. If the string is
- * equal to "true" using a non-case sensitive comparison, the result will be
- * a Boolean representing true, otherwise it will be a Boolean representing
- * false.
- *
- * @param string
- * The name of the desired boolean.
- */
- public Boolean(String string) {
- this(parseBoolean(string));
- }
-
- /**
- * Constructs a new instance of this class given true or false.
- *
- * @param value
- * true or false.
- */
- public Boolean(boolean value) {
- this.value = value;
- }
-
- /**
- * Answers true if the receiver represents true and false if the receiver
- * represents false.
- *
- * @return true or false.
- */
- public boolean booleanValue() {
- return value;
- }
-
- /**
- * Compares the argument to the receiver, and answers true if they represent
- * the <em>same</em> object using a class specific comparison.
- * <p>
- * In this case, the argument must also be a Boolean, and the receiver and
- * argument must represent the same boolean value (i.e. both true or both
- * false).
- *
- * @param o
- * the object to compare with this object
- * @return <code>true</code> if the object is the same as this object
- * <code>false</code> if it is different from this object
- *
- * @see #hashCode
- */
- @Override
- public boolean equals(Object o) {
- return (o == this)
- || ((o instanceof Boolean) && (value == ((Boolean) o).value));
- }
-
- /**
- * <p>
- * Compares this <code>Boolean</code> to another <code>Boolean</code>.
- * If this instance has the same value as the instance passed, then
- * <code>0</code> is returned. If this instance is <code>true</code> and
- * the instance passed is <code>false</code>, then a positive value is
- * returned. If this instance is <code>false</code> and the instance
- * passed is <code>true</code>, then a negative value is returned.
- * </p>
- *
- * @param that The instance to compare to.
- * @throws java.lang.NullPointerException if <code>that</code> is
- * <code>null</code>.
- * @since 1.5
- * @see java.lang.Comparable
- */
- public int compareTo(Boolean that) {
- if (that == null) {
- throw new NullPointerException();
- }
-
- if (this.value == that.value) {
- return 0;
- }
-
- return this.value ? 1 : -1;
- }
-
- /**
- * Answers an integer hash code for the receiver. Any two objects which
- * answer <code>true</code> when passed to <code>equals</code> must
- * answer the same value for this method.
- *
- * @return the receiver's hash
- *
- * @see #equals
- */
- @Override
- public int hashCode() {
- return value ? 1231 : 1237;
- }
-
- /**
- * Answers a string containing a concise, human-readable description of the
- * receiver.
- *
- * @return a printable representation for the receiver.
- */
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- /**
- * Answers true if the system property described by the argument equal to
- * "true" using case insensitive comparison, and false otherwise.
- *
- * @param string The name of the desired boolean.
- * @return The boolean value.
- */
- public static boolean getBoolean(String string) {
- if (string == null || string.length() == 0) {
- return false;
- }
- return (parseBoolean(System.getProperty(string)));
- }
-
- /**
- * <p>
- * Parses the string as a <code>boolean</code>. If the string is not
- * <code>null</code> and is equal to <code>"true"</code>, regardless
- * case, then <code>true</code> is returned, otherwise <code>false</code>.
- * </p>
- *
- * @param s The string to parse.
- * @return A boolean value.
- * @since 1.5
- */
- public static boolean parseBoolean(String s) {
- return "true".equalsIgnoreCase(s);
- }
-
- /**
- * Converts the specified boolean to its string representation. When the
- * boolean is true answer <code>"true"</code>, otherwise answer
- * <code>"false"</code>.
- *
- * @param value
- * the boolean
- * @return the boolean converted to a string
- */
- public static String toString(boolean value) {
- return String.valueOf(value);
- }
-
- /**
- * Answers a Boolean representing true if the argument is equal to "true"
- * using case insensitive comparison, and a Boolean representing false
- * otherwise.
- *
- * @param string
- * The name of the desired boolean.
- * @return the boolean value.
- */
- public static Boolean valueOf(String string) {
- return parseBoolean(string) ? Boolean.TRUE : Boolean.FALSE;
- }
-
- /**
- * Answers Boolean.TRUE if the argument is equal to "true" using case
- * insensitive comparison, and Boolean.FALSE representing false otherwise.
- *
- * @param b
- * the boolean value.
- * @return Boolean.TRUE or Boolean.FALSE Global true/false objects.
- */
- public static Boolean valueOf(boolean b) {
- return b ? Boolean.TRUE : Boolean.FALSE;
- }
-}
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+import java.io.Serializable;
+
+/**
+ * <p>Boolean is the wrapper for the primitive type <code>boolean</code>.</p>
+ * @since 1.0
+ */
+public final class Boolean implements Serializable, Comparable<Boolean> {
+
+ private static final long serialVersionUID = -3665804199014368530L;
+
+ /**
+ * The boolean value of the receiver.
+ */
+ private final boolean value;
+
+ /**
+ * The java.lang.Class that represents this class.
+ */
+ @SuppressWarnings("unchecked")
+ public static final Class<Boolean> TYPE = (Class<Boolean>) new boolean[0]
+ .getClass().getComponentType();
+
+ // Note: This can't be set to "boolean.class", since *that* is
+ // defined to be "java.lang.Boolean.TYPE";
+
+ /**
+ * The instance of the receiver which represents truth.
+ */
+ public static final Boolean TRUE = new Boolean(true);
+
+ /**
+ * The instance of the receiver which represents falsehood.
+ */
+ public static final Boolean FALSE = new Boolean(false);
+
+ /**
+ * Constructs a new instance of this class given a string. If the string is
+ * equal to "true" using a non-case sensitive comparison, the result will be
+ * a Boolean representing true, otherwise it will be a Boolean representing
+ * false.
+ *
+ * @param string
+ * The name of the desired boolean.
+ */
+ public Boolean(String string) {
+ this(parseBoolean(string));
+ }
+
+ /**
+ * Constructs a new instance of this class given true or false.
+ *
+ * @param value
+ * true or false.
+ */
+ public Boolean(boolean value) {
+ this.value = value;
+ }
+
+ /**
+ * Answers true if the receiver represents true and false if the receiver
+ * represents false.
+ *
+ * @return true or false.
+ */
+ public boolean booleanValue() {
+ return value;
+ }
+
+ /**
+ * Compares the argument to the receiver, and answers true if they represent
+ * the <em>same</em> object using a class specific comparison.
+ * <p>
+ * In this case, the argument must also be a Boolean, and the receiver and
+ * argument must represent the same boolean value (i.e. both true or both
+ * false).
+ *
+ * @param o
+ * the object to compare with this object
+ * @return <code>true</code> if the object is the same as this object
+ * <code>false</code> if it is different from this object
+ *
+ * @see #hashCode
+ */
+ @Override
+ public boolean equals(Object o) {
+ return (o == this)
+ || ((o instanceof Boolean) && (value == ((Boolean) o).value));
+ }
+
+ /**
+ * <p>
+ * Compares this <code>Boolean</code> to another <code>Boolean</code>.
+ * If this instance has the same value as the instance passed, then
+ * <code>0</code> is returned. If this instance is <code>true</code> and
+ * the instance passed is <code>false</code>, then a positive value is
+ * returned. If this instance is <code>false</code> and the instance
+ * passed is <code>true</code>, then a negative value is returned.
+ * </p>
+ *
+ * @param that The instance to compare to.
+ * @throws java.lang.NullPointerException if <code>that</code> is
+ * <code>null</code>.
+ * @since 1.5
+ * @see java.lang.Comparable
+ */
+ public int compareTo(Boolean that) {
+ if (that == null) {
+ throw new NullPointerException();
+ }
+
+ if (this.value == that.value) {
+ return 0;
+ }
+
+ return this.value ? 1 : -1;
+ }
+
+ /**
+ * Answers an integer hash code for the receiver. Any two objects which
+ * answer <code>true</code> when passed to <code>equals</code> must
+ * answer the same value for this method.
+ *
+ * @return the receiver's hash
+ *
+ * @see #equals
+ */
+ @Override
+ public int hashCode() {
+ return value ? 1231 : 1237;
+ }
+
+ /**
+ * Answers a string containing a concise, human-readable description of the
+ * receiver.
+ *
+ * @return a printable representation for the receiver.
+ */
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ /**
+ * Answers true if the system property described by the argument equal to
+ * "true" using case insensitive comparison, and false otherwise.
+ *
+ * @param string The name of the desired boolean.
+ * @return The boolean value.
+ */
+ public static boolean getBoolean(String string) {
+ if (string == null || string.length() == 0) {
+ return false;
+ }
+ return (parseBoolean(System.getProperty(string)));
+ }
+
+ /**
+ * <p>
+ * Parses the string as a <code>boolean</code>. If the string is not
+ * <code>null</code> and is equal to <code>"true"</code>, regardless
+ * case, then <code>true</code> is returned, otherwise <code>false</code>.
+ * </p>
+ *
+ * @param s The string to parse.
+ * @return A boolean value.
+ * @since 1.5
+ */
+ public static boolean parseBoolean(String s) {
+ return "true".equalsIgnoreCase(s);
+ }
+
+ /**
+ * Converts the specified boolean to its string representation. When the
+ * boolean is true answer <code>"true"</code>, otherwise answer
+ * <code>"false"</code>.
+ *
+ * @param value
+ * the boolean
+ * @return the boolean converted to a string
+ */
+ public static String toString(boolean value) {
+ return String.valueOf(value);
+ }
+
+ /**
+ * Answers a Boolean representing true if the argument is equal to "true"
+ * using case insensitive comparison, and a Boolean representing false
+ * otherwise.
+ *
+ * @param string
+ * The name of the desired boolean.
+ * @return the boolean value.
+ */
+ public static Boolean valueOf(String string) {
+ return parseBoolean(string) ? Boolean.TRUE : Boolean.FALSE;
+ }
+
+ /**
+ * Answers Boolean.TRUE if the argument is equal to "true" using case
+ * insensitive comparison, and Boolean.FALSE representing false otherwise.
+ *
+ * @param b
+ * the boolean value.
+ * @return Boolean.TRUE or Boolean.FALSE Global true/false objects.
+ */
+ public static Boolean valueOf(boolean b) {
+ return b ? Boolean.TRUE : Boolean.FALSE;
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Boolean.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Byte.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Byte.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Byte.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Byte.java Sun Aug 20 13:54:27 2006
@@ -1,343 +1,343 @@
-/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package java.lang;
-
-/**
- * <p>Byte is the wrapper for the primitive type <code>byte</code>.</p>
- * @since 1.1
- */
-public final class Byte extends Number implements Comparable<Byte> {
- private static final long serialVersionUID = -7183698231559129828L;
-
- /**
- * The value which the receiver represents.
- */
- private final byte value;
-
- /**
- * <p>
- * Constant for the maximum <code>byte</code> value, 2<sup>7</sup>-1.
- * </p>
- */
- public static final byte MAX_VALUE = (byte) 0x7F;
-
- /**
- * <p>
- * Constant for the minimum <code>byte</code> value, -2<sup>7</sup>.
- * </p>
- */
- public static final byte MIN_VALUE = (byte) 0x80;
-
- /**
- * <p>
- * Constant for the number of bits to represent a <code>byte</code> in
- * two's compliment form.
- * </p>
- *
- * @since 1.5
- */
- public static final int SIZE = 8;
-
- /**
- * The java.lang.Class that represents this class.
- */
- @SuppressWarnings("unchecked")
- public static final Class<Byte> TYPE = (Class<Byte>) new byte[0].getClass()
- .getComponentType();
-
- // Note: This can't be set to "byte.class", since *that* is
- // defined to be "java.lang.Byte.TYPE";
-
- /**
- * <p>
- * A cache of instances used by {@link #valueOf(byte)} and auto-boxing.
- * </p>
- */
- private static final Byte[] CACHE = new Byte[256];
-
- /**
- * Constructs a new instance of the receiver which represents the byte
- * valued argument.
- *
- * @param value
- * the byte to store in the new instance.
- */
- public Byte(byte value) {
- this.value = value;
- }
-
- /**
- * Constructs a new instance of this class given a string.
- *
- * @param string
- * a string representation of a single byte quantity.
- * @throws NumberFormatException
- * if the argument could not be parsed as a byte quantity.
- */
- public Byte(String string) throws NumberFormatException {
- this(parseByte(string));
- }
-
- /**
- * Answers the byte value which the receiver represents
- *
- * @return byte the value of the receiver.
- */
- @Override
- public byte byteValue() {
- return value;
- }
-
- /**
- * <p>
- * Compares this <code>Byte</code> to the <code>Byte</code> passed. If
- * this instance's value is equal to the value of the instance passed, then
- * 0 is returned. If this instance's value is less than the value of the
- * instance passed, then a negative value is returned. If this instance's
- * value is greater than the value of the instance passed, then a positive
- * value is returned.
- * </p>
- *
- * @param object The instance to compare to.
- * @throws NullPointerException if <code>object</code> is
- * <code>null</code>.
- * @since 1.2
- */
- public int compareTo(Byte object) {
- return value > object.value ? 1 : (value < object.value ? -1 : 0);
- }
-
- /**
- * Parses the string argument as if it was a byte value and returns the
- * result. It is an error if the received string does not contain a
- * representation of a single byte quantity. The string may be a hexadecimal
- * ("0x..."), octal ("0..."), or decimal ("...") representation of a byte.
- *
- * @param string
- * a string representation of a single byte quantity.
- * @return Byte the value represented by the argument
- * @throws NumberFormatException
- * if the argument could not be parsed as a byte quantity.
- */
- public static Byte decode(String string) throws NumberFormatException {
- int intValue = Integer.decode(string).intValue();
- byte result = (byte) intValue;
- if (result == intValue) {
- return valueOf(result);
- }
- throw new NumberFormatException();
- }
-
- /**
- * Answers the double value which the receiver represents
- *
- * @return double the value of the receiver.
- */
- @Override
- public double doubleValue() {
- return value;
- }
-
- /**
- * Compares the argument to the receiver, and answers true if they represent
- * the <em>same</em> object using a class specific comparison.
- * <p>
- * In this case, the argument must also be a Byte, and the receiver and
- * argument must represent the same byte value.
- *
- * @param object
- * the object to compare with this object
- * @return <code>true</code> if the object is the same as this object
- * <code>false</code> if it is different from this object
- * @see #hashCode
- */
- @Override
- public boolean equals(Object object) {
- return (object == this) || (object instanceof Byte)
- && (value == ((Byte) object).value);
- }
-
- /**
- * Answers the float value which the receiver represents
- *
- * @return float the value of the receiver.
- */
- @Override
- public float floatValue() {
- return value;
- }
-
- /**
- * Answers an integer hash code for the receiver. Any two objects which
- * answer <code>true</code> when passed to <code>equals</code> must
- * answer the same value for this method.
- *
- * @return the receiver's hash
- *
- * @see #equals
- */
- @Override
- public int hashCode() {
- return value;
- }
-
- /**
- * Answers the int value which the receiver represents
- *
- * @return int the value of the receiver.
- */
- @Override
- public int intValue() {
- return value;
- }
-
- /**
- * Answers the long value which the receiver represents
- *
- * @return long the value of the receiver.
- */
- @Override
- public long longValue() {
- return value;
- }
-
- /**
- * Parses the string argument as if it was a byte value and returns the
- * result. Throws NumberFormatException if the string does not represent a
- * single byte quantity.
- *
- * @param string
- * a string representation of a single byte quantity.
- * @return byte the value represented by the argument
- * @throws NumberFormatException
- * if the argument could not be parsed as a byte quantity.
- */
- public static byte parseByte(String string) throws NumberFormatException {
- int intValue = Integer.parseInt(string);
- byte result = (byte) intValue;
- if (result == intValue) {
- return result;
- }
- throw new NumberFormatException();
- }
-
- /**
- * Parses the string argument as if it was a byte value and returns the
- * result. Throws NumberFormatException if the string does not represent a
- * single byte quantity. The second argument specifies the radix to use when
- * parsing the value.
- *
- * @param string
- * a string representation of a single byte quantity.
- * @param radix
- * the radix to use when parsing.
- * @return byte the value represented by the argument
- * @throws NumberFormatException
- * if the argument could not be parsed as a byte quantity.
- */
- public static byte parseByte(String string, int radix)
- throws NumberFormatException {
- int intValue = Integer.parseInt(string, radix);
- byte result = (byte) intValue;
- if (result == intValue) {
- return result;
- }
- throw new NumberFormatException();
- }
-
- /**
- * Answers the short value which the receiver represents
- *
- * @return short the value of the receiver.
- */
- @Override
- public short shortValue() {
- return value;
- }
-
- /**
- * Answers a string containing a concise, human-readable description of the
- * receiver.
- *
- * @return a printable representation for the receiver.
- */
- @Override
- public String toString() {
- return Integer.toString(value);
- }
-
- /**
- * Answers a string containing a concise, human-readable description of the
- * argument.
- *
- * @param value
- * byte the byte to convert.
- * @return String a printable representation for the byte.
- */
- public static String toString(byte value) {
- return Integer.toString(value);
- }
-
- /**
- * Parses the string argument as if it was a byte value and returns a Byte
- * representing the result. Throws NumberFormatException if the string
- * cannot be parsed as a byte quantity.
- *
- * @param string
- * a string representation of a single byte quantity.
- * @return Byte the value represented by the argument
- * @throws NumberFormatException
- * if the argument could not be parsed as a byte quantity.
- */
- public static Byte valueOf(String string) throws NumberFormatException {
- return valueOf(parseByte(string));
- }
-
- /**
- * Parses the string argument as if it was a byte value and returns a Byte
- * representing the result. Throws NumberFormatException if the string
- * cannot be parsed as a byte quantity. The second argument specifies the
- * radix to use when parsing the value.
- *
- * @param string
- * a string representation of a single byte quantity.
- * @param radix
- * the radix to use when parsing.
- * @return Byte the value represented by the argument
- * @throws NumberFormatException
- * if the argument could not be parsed as a byte quantity.
- */
- public static Byte valueOf(String string, int radix)
- throws NumberFormatException {
- return valueOf(parseByte(string, radix));
- }
-
- /**
- * <p>Returns a <code>Byte</code> instance for the <code>byte</code> value passed.
- * This method is preferred over the constructor, as this method may maintain a cache
- * of instances.</p>
- * @param b The byte value.
- * @return A <code>Byte</code> instance.
- * @since 1.5
- */
- public static Byte valueOf(byte b) {
- synchronized (CACHE) {
- int idx = b - MIN_VALUE;
- Byte result = CACHE[idx];
- return (result == null ? CACHE[idx] = new Byte(b) : result);
- }
- }
-}
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+/**
+ * <p>Byte is the wrapper for the primitive type <code>byte</code>.</p>
+ * @since 1.1
+ */
+public final class Byte extends Number implements Comparable<Byte> {
+ private static final long serialVersionUID = -7183698231559129828L;
+
+ /**
+ * The value which the receiver represents.
+ */
+ private final byte value;
+
+ /**
+ * <p>
+ * Constant for the maximum <code>byte</code> value, 2<sup>7</sup>-1.
+ * </p>
+ */
+ public static final byte MAX_VALUE = (byte) 0x7F;
+
+ /**
+ * <p>
+ * Constant for the minimum <code>byte</code> value, -2<sup>7</sup>.
+ * </p>
+ */
+ public static final byte MIN_VALUE = (byte) 0x80;
+
+ /**
+ * <p>
+ * Constant for the number of bits to represent a <code>byte</code> in
+ * two's compliment form.
+ * </p>
+ *
+ * @since 1.5
+ */
+ public static final int SIZE = 8;
+
+ /**
+ * The java.lang.Class that represents this class.
+ */
+ @SuppressWarnings("unchecked")
+ public static final Class<Byte> TYPE = (Class<Byte>) new byte[0].getClass()
+ .getComponentType();
+
+ // Note: This can't be set to "byte.class", since *that* is
+ // defined to be "java.lang.Byte.TYPE";
+
+ /**
+ * <p>
+ * A cache of instances used by {@link #valueOf(byte)} and auto-boxing.
+ * </p>
+ */
+ private static final Byte[] CACHE = new Byte[256];
+
+ /**
+ * Constructs a new instance of the receiver which represents the byte
+ * valued argument.
+ *
+ * @param value
+ * the byte to store in the new instance.
+ */
+ public Byte(byte value) {
+ this.value = value;
+ }
+
+ /**
+ * Constructs a new instance of this class given a string.
+ *
+ * @param string
+ * a string representation of a single byte quantity.
+ * @throws NumberFormatException
+ * if the argument could not be parsed as a byte quantity.
+ */
+ public Byte(String string) throws NumberFormatException {
+ this(parseByte(string));
+ }
+
+ /**
+ * Answers the byte value which the receiver represents
+ *
+ * @return byte the value of the receiver.
+ */
+ @Override
+ public byte byteValue() {
+ return value;
+ }
+
+ /**
+ * <p>
+ * Compares this <code>Byte</code> to the <code>Byte</code> passed. If
+ * this instance's value is equal to the value of the instance passed, then
+ * 0 is returned. If this instance's value is less than the value of the
+ * instance passed, then a negative value is returned. If this instance's
+ * value is greater than the value of the instance passed, then a positive
+ * value is returned.
+ * </p>
+ *
+ * @param object The instance to compare to.
+ * @throws NullPointerException if <code>object</code> is
+ * <code>null</code>.
+ * @since 1.2
+ */
+ public int compareTo(Byte object) {
+ return value > object.value ? 1 : (value < object.value ? -1 : 0);
+ }
+
+ /**
+ * Parses the string argument as if it was a byte value and returns the
+ * result. It is an error if the received string does not contain a
+ * representation of a single byte quantity. The string may be a hexadecimal
+ * ("0x..."), octal ("0..."), or decimal ("...") representation of a byte.
+ *
+ * @param string
+ * a string representation of a single byte quantity.
+ * @return Byte the value represented by the argument
+ * @throws NumberFormatException
+ * if the argument could not be parsed as a byte quantity.
+ */
+ public static Byte decode(String string) throws NumberFormatException {
+ int intValue = Integer.decode(string).intValue();
+ byte result = (byte) intValue;
+ if (result == intValue) {
+ return valueOf(result);
+ }
+ throw new NumberFormatException();
+ }
+
+ /**
+ * Answers the double value which the receiver represents
+ *
+ * @return double the value of the receiver.
+ */
+ @Override
+ public double doubleValue() {
+ return value;
+ }
+
+ /**
+ * Compares the argument to the receiver, and answers true if they represent
+ * the <em>same</em> object using a class specific comparison.
+ * <p>
+ * In this case, the argument must also be a Byte, and the receiver and
+ * argument must represent the same byte value.
+ *
+ * @param object
+ * the object to compare with this object
+ * @return <code>true</code> if the object is the same as this object
+ * <code>false</code> if it is different from this object
+ * @see #hashCode
+ */
+ @Override
+ public boolean equals(Object object) {
+ return (object == this) || (object instanceof Byte)
+ && (value == ((Byte) object).value);
+ }
+
+ /**
+ * Answers the float value which the receiver represents
+ *
+ * @return float the value of the receiver.
+ */
+ @Override
+ public float floatValue() {
+ return value;
+ }
+
+ /**
+ * Answers an integer hash code for the receiver. Any two objects which
+ * answer <code>true</code> when passed to <code>equals</code> must
+ * answer the same value for this method.
+ *
+ * @return the receiver's hash
+ *
+ * @see #equals
+ */
+ @Override
+ public int hashCode() {
+ return value;
+ }
+
+ /**
+ * Answers the int value which the receiver represents
+ *
+ * @return int the value of the receiver.
+ */
+ @Override
+ public int intValue() {
+ return value;
+ }
+
+ /**
+ * Answers the long value which the receiver represents
+ *
+ * @return long the value of the receiver.
+ */
+ @Override
+ public long longValue() {
+ return value;
+ }
+
+ /**
+ * Parses the string argument as if it was a byte value and returns the
+ * result. Throws NumberFormatException if the string does not represent a
+ * single byte quantity.
+ *
+ * @param string
+ * a string representation of a single byte quantity.
+ * @return byte the value represented by the argument
+ * @throws NumberFormatException
+ * if the argument could not be parsed as a byte quantity.
+ */
+ public static byte parseByte(String string) throws NumberFormatException {
+ int intValue = Integer.parseInt(string);
+ byte result = (byte) intValue;
+ if (result == intValue) {
+ return result;
+ }
+ throw new NumberFormatException();
+ }
+
+ /**
+ * Parses the string argument as if it was a byte value and returns the
+ * result. Throws NumberFormatException if the string does not represent a
+ * single byte quantity. The second argument specifies the radix to use when
+ * parsing the value.
+ *
+ * @param string
+ * a string representation of a single byte quantity.
+ * @param radix
+ * the radix to use when parsing.
+ * @return byte the value represented by the argument
+ * @throws NumberFormatException
+ * if the argument could not be parsed as a byte quantity.
+ */
+ public static byte parseByte(String string, int radix)
+ throws NumberFormatException {
+ int intValue = Integer.parseInt(string, radix);
+ byte result = (byte) intValue;
+ if (result == intValue) {
+ return result;
+ }
+ throw new NumberFormatException();
+ }
+
+ /**
+ * Answers the short value which the receiver represents
+ *
+ * @return short the value of the receiver.
+ */
+ @Override
+ public short shortValue() {
+ return value;
+ }
+
+ /**
+ * Answers a string containing a concise, human-readable description of the
+ * receiver.
+ *
+ * @return a printable representation for the receiver.
+ */
+ @Override
+ public String toString() {
+ return Integer.toString(value);
+ }
+
+ /**
+ * Answers a string containing a concise, human-readable description of the
+ * argument.
+ *
+ * @param value
+ * byte the byte to convert.
+ * @return String a printable representation for the byte.
+ */
+ public static String toString(byte value) {
+ return Integer.toString(value);
+ }
+
+ /**
+ * Parses the string argument as if it was a byte value and returns a Byte
+ * representing the result. Throws NumberFormatException if the string
+ * cannot be parsed as a byte quantity.
+ *
+ * @param string
+ * a string representation of a single byte quantity.
+ * @return Byte the value represented by the argument
+ * @throws NumberFormatException
+ * if the argument could not be parsed as a byte quantity.
+ */
+ public static Byte valueOf(String string) throws NumberFormatException {
+ return valueOf(parseByte(string));
+ }
+
+ /**
+ * Parses the string argument as if it was a byte value and returns a Byte
+ * representing the result. Throws NumberFormatException if the string
+ * cannot be parsed as a byte quantity. The second argument specifies the
+ * radix to use when parsing the value.
+ *
+ * @param string
+ * a string representation of a single byte quantity.
+ * @param radix
+ * the radix to use when parsing.
+ * @return Byte the value represented by the argument
+ * @throws NumberFormatException
+ * if the argument could not be parsed as a byte quantity.
+ */
+ public static Byte valueOf(String string, int radix)
+ throws NumberFormatException {
+ return valueOf(parseByte(string, radix));
+ }
+
+ /**
+ * <p>Returns a <code>Byte</code> instance for the <code>byte</code> value passed.
+ * This method is preferred over the constructor, as this method may maintain a cache
+ * of instances.</p>
+ * @param b The byte value.
+ * @return A <code>Byte</code> instance.
+ * @since 1.5
+ */
+ public static Byte valueOf(byte b) {
+ synchronized (CACHE) {
+ int idx = b - MIN_VALUE;
+ Byte result = CACHE[idx];
+ return (result == null ? CACHE[idx] = new Byte(b) : result);
+ }
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Byte.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CharSequence.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CharSequence.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CharSequence.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CharSequence.java Sun Aug 20 13:54:27 2006
@@ -1,64 +1,64 @@
-/* Copyright 2003, 2005 The Apache Software Foundation or its licensors, as applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package java.lang;
-
-
-/**
- * The CharSequence interface represents an ordered set of characters and the
- * functions to probe them.
- */
-public interface CharSequence {
-
- /**
- * Answers the number of characters in the sequence.
- *
- * @return the number of charcters in the sequence
- */
- public int length();
-
- /**
- * Answers the character at the specified index (0-based indexing).
- *
- * @param index -
- * of the character to return
- * @return character indicated by index
- * @throws IndexOutOfBoundsException
- * when <code>index < 0</code> or
- * <code>index</code> >= the length of the <code>CharSequence</code>
- */
- public char charAt(int index);
-
- /**
- * Answers a CharSequence from the <code>start</code> index to the
- * <code>end</code> index of this sequence.
- *
- * @param start -- index of the start of the sub-sequence to return
- * @param end -- index of the end of the sub-sequence to return
- * @return the sub sequence from start to end
- * @throws IndexOutOfBoundsException when 1. either index is below 0
- * 2. either index >= <code>this.length()</code>
- * 3. <code>start > end </code>
- */
- public CharSequence subSequence(int start, int end);
-
- /**
- * Answers a String with the same characters and ordering of this
- * CharSequence
- *
- * @return a String based on the CharSequence
- */
- public String toString();
-}
+/* Copyright 2003, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+
+/**
+ * The CharSequence interface represents an ordered set of characters and the
+ * functions to probe them.
+ */
+public interface CharSequence {
+
+ /**
+ * Answers the number of characters in the sequence.
+ *
+ * @return the number of charcters in the sequence
+ */
+ public int length();
+
+ /**
+ * Answers the character at the specified index (0-based indexing).
+ *
+ * @param index -
+ * of the character to return
+ * @return character indicated by index
+ * @throws IndexOutOfBoundsException
+ * when <code>index < 0</code> or
+ * <code>index</code> >= the length of the <code>CharSequence</code>
+ */
+ public char charAt(int index);
+
+ /**
+ * Answers a CharSequence from the <code>start</code> index to the
+ * <code>end</code> index of this sequence.
+ *
+ * @param start -- index of the start of the sub-sequence to return
+ * @param end -- index of the end of the sub-sequence to return
+ * @return the sub sequence from start to end
+ * @throws IndexOutOfBoundsException when 1. either index is below 0
+ * 2. either index >= <code>this.length()</code>
+ * 3. <code>start > end </code>
+ */
+ public CharSequence subSequence(int start, int end);
+
+ /**
+ * Answers a String with the same characters and ordering of this
+ * CharSequence
+ *
+ * @return a String based on the CharSequence
+ */
+ public String toString();
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CharSequence.java
------------------------------------------------------------------------------
svn:eol-style = native