harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r433041 [2/13] - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang: ./ ref/ reflect/
Date Sun, 20 Aug 2006 20:54:31 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCastException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCastException.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCastException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCastException.java Sun Aug 20 13:54:27 2006
@@ -1,61 +1,61 @@
-/* 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 org.apache.harmony.luni.util.Msg;
-
-/**
- * This runtime exception is thrown when a program attempts to cast a an object
- * to a type which it is not compatible with.
- * 
- */
-public class ClassCastException extends RuntimeException {
-	private static final long serialVersionUID = -9223365651070458532L;
-
-	/**
-	 * Constructs a new instance of this class with its walkback filled in.
-	 * 
-	 */
-	public ClassCastException() {
-		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 ClassCastException(String detailMessage) {
-		super(detailMessage);
-	}
-
-	/**
-	 * Constructs a new instance of this class with its walkback and message
-	 * filled in.
-	 * 
-	 * @param instanceClass
-	 *            Class The class being cast from.
-	 * 
-	 * @param castClass
-	 *            Class The class being cast to.
-	 */
-	ClassCastException(Class<?> instanceClass, Class<?> castClass) {
-        super(Msg.getString("K0340", instanceClass.getName(), castClass
-                .getName()));
-    }
-}
+/* 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 org.apache.harmony.luni.util.Msg;
+
+/**
+ * This runtime exception is thrown when a program attempts to cast a an object
+ * to a type which it is not compatible with.
+ * 
+ */
+public class ClassCastException extends RuntimeException {
+	private static final long serialVersionUID = -9223365651070458532L;
+
+	/**
+	 * Constructs a new instance of this class with its walkback filled in.
+	 * 
+	 */
+	public ClassCastException() {
+		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 ClassCastException(String detailMessage) {
+		super(detailMessage);
+	}
+
+	/**
+	 * Constructs a new instance of this class with its walkback and message
+	 * filled in.
+	 * 
+	 * @param instanceClass
+	 *            Class The class being cast from.
+	 * 
+	 * @param castClass
+	 *            Class The class being cast to.
+	 */
+	ClassCastException(Class<?> instanceClass, Class<?> castClass) {
+        super(Msg.getString("K0340", instanceClass.getName(), castClass
+                .getName()));
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCastException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCircularityError.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCircularityError.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCircularityError.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCircularityError.java Sun Aug 20 13:54:27 2006
@@ -1,48 +1,48 @@
-/* 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 an attempt is made to load a
- * class which would directly or indirectly inherit from one of its subclasses.
- * <p>
- * Note that this can only occur when inconsistant class files are being loaded,
- * since this error would be detected at compile time.
- */
-public class ClassCircularityError extends LinkageError {
-
-    private static final long serialVersionUID = 1054362542914539689L;
-
-    /**
-	 * Constructs a new instance of this class with its walkback filled in.
-	 */
-	public ClassCircularityError() {
-		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 ClassCircularityError(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 an attempt is made to load a
+ * class which would directly or indirectly inherit from one of its subclasses.
+ * <p>
+ * Note that this can only occur when inconsistant class files are being loaded,
+ * since this error would be detected at compile time.
+ */
+public class ClassCircularityError extends LinkageError {
+
+    private static final long serialVersionUID = 1054362542914539689L;
+
+    /**
+	 * Constructs a new instance of this class with its walkback filled in.
+	 */
+	public ClassCircularityError() {
+		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 ClassCircularityError(String detailMessage) {
+		super(detailMessage);
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassCircularityError.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassFormatError.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassFormatError.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassFormatError.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassFormatError.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 error is thrown by the class loader when it discovers that a class that
- * it is loading does not have the correct shape.
- */
-public class ClassFormatError extends LinkageError {
-
-    private static final long serialVersionUID = -8420114879011949195L;
-
-    /**
-	 * Constructs a new instance of this class with its walkback filled in.
-	 */
-	public ClassFormatError() {
-		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 ClassFormatError(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 by the class loader when it discovers that a class that
+ * it is loading does not have the correct shape.
+ */
+public class ClassFormatError extends LinkageError {
+
+    private static final long serialVersionUID = -8420114879011949195L;
+
+    /**
+	 * Constructs a new instance of this class with its walkback filled in.
+	 */
+	public ClassFormatError() {
+		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 ClassFormatError(String detailMessage) {
+		super(detailMessage);
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/ClassFormatError.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CloneNotSupportedException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CloneNotSupportedException.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CloneNotSupportedException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CloneNotSupportedException.java Sun Aug 20 13:54:27 2006
@@ -1,46 +1,46 @@
-/* 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 exception is thrown when a program attempts to clone an object which
- * does not support the Cloneable interface.
- * 
- * @see Cloneable
- */
-public class CloneNotSupportedException extends Exception {
-
-    private static final long serialVersionUID = 5195511250079656443L;
-
-    /**
-	 * Constructs a new instance of this class with its walkback filled in.
-	 */
-	public CloneNotSupportedException() {
-		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 CloneNotSupportedException(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 exception is thrown when a program attempts to clone an object which
+ * does not support the Cloneable interface.
+ * 
+ * @see Cloneable
+ */
+public class CloneNotSupportedException extends Exception {
+
+    private static final long serialVersionUID = 5195511250079656443L;
+
+    /**
+	 * Constructs a new instance of this class with its walkback filled in.
+	 */
+	public CloneNotSupportedException() {
+		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 CloneNotSupportedException(String detailMessage) {
+		super(detailMessage);
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/CloneNotSupportedException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Cloneable.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Cloneable.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Cloneable.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Cloneable.java Sun Aug 20 13:54:27 2006
@@ -1,30 +1,30 @@
-/* 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 (empty) interface should be implemented by all classes which wish to
- * support cloning. The implementation of clone in class Object checks to ensure
- * that the object being cloned implements this interface, and throws
- * CloneNotSupportedException if not.
- * 
- * @see Object#clone
- * @see CloneNotSupportedException
- */
-public interface Cloneable {
-	// Marker interface
-}
+/* 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 (empty) interface should be implemented by all classes which wish to
+ * support cloning. The implementation of clone in class Object checks to ensure
+ * that the object being cloned implements this interface, and throws
+ * CloneNotSupportedException if not.
+ * 
+ * @see Object#clone
+ * @see CloneNotSupportedException
+ */
+public interface Cloneable {
+	// Marker interface
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Cloneable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Comparable.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Comparable.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Comparable.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Comparable.java Sun Aug 20 13:54:27 2006
@@ -1,49 +1,49 @@
-/* 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;
-
-
-/**
- * This interface should be implemented by all classes which wish to define a
- * <em>natural ordering</em> of their instances. The ordering rule must be
- * transitive and invertable (i.e. the sign of the result of x.compareTo(y) must
- * equal the negation of the sign of the result of y.compareTo(x) for all x and
- * y).
- * <p>
- * In addition, it is desireable (but not required) that when the result of
- * x.compareTo(y) is zero (and only then) the result of x.equals(y) should be
- * true.
- * 
- */
-public interface Comparable<T> {
-	
-	/**
-	 * Answers an integer indicating the relative positions of the receiver and
-	 * the argument in the natural order of elements of the receiver's class.
-	 * 
-	 * 
-	 * @return int which should be <0 if the receiver should sort before the
-	 *         argument, 0 if the receiver should sort in the same position as
-	 *         the argument, and >0 if the receiver should sort after the
-	 *         argument.
-	 * @param another
-	 *            Object an object to compare the receiver to
-	 * @throws ClassCastException
-	 *             if the argument can not be converted into something
-	 *             comparable with the receiver.
-	 */
-	int compareTo(T another);
-}
+/* 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;
+
+
+/**
+ * This interface should be implemented by all classes which wish to define a
+ * <em>natural ordering</em> of their instances. The ordering rule must be
+ * transitive and invertable (i.e. the sign of the result of x.compareTo(y) must
+ * equal the negation of the sign of the result of y.compareTo(x) for all x and
+ * y).
+ * <p>
+ * In addition, it is desireable (but not required) that when the result of
+ * x.compareTo(y) is zero (and only then) the result of x.equals(y) should be
+ * true.
+ * 
+ */
+public interface Comparable<T> {
+	
+	/**
+	 * Answers an integer indicating the relative positions of the receiver and
+	 * the argument in the natural order of elements of the receiver's class.
+	 * 
+	 * 
+	 * @return int which should be <0 if the receiver should sort before the
+	 *         argument, 0 if the receiver should sort in the same position as
+	 *         the argument, and >0 if the receiver should sort after the
+	 *         argument.
+	 * @param another
+	 *            Object an object to compare the receiver to
+	 * @throws ClassCastException
+	 *             if the argument can not be converted into something
+	 *             comparable with the receiver.
+	 */
+	int compareTo(T another);
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Comparable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Double.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Double.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Double.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Double.java Sun Aug 20 13:54:27 2006
@@ -1,503 +1,503 @@
-/* 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>
- * Double is the wrapper for the primitive type <code>double</code>.
- * </p>
- * 
- * @see java.lang.Number
- * @since 1.0
- */
-public final class Double extends Number implements Comparable<Double> {
-
-	private static final long serialVersionUID = -9172774392245257468L;
-
-	/**
-	 * The value which the receiver represents.
-	 */
-	private final double value;
-
-    /**
-     * <p>
-     * Constant for the maximum <code>double</code> value, (2 - 2<sup>-52/sup>) * 2<sup>1023</sup>.
-     * </p>
-     */
-	public static final double MAX_VALUE = 1.79769313486231570e+308;
-
-    /**
-     * <p>
-     * Constant for the minimum <code>double</code> value, 2<sup>-1074</sup>.
-     * </p>
-     */
-	public static final double MIN_VALUE = 5e-324;
-
-	/* 4.94065645841246544e-324 gets rounded to 9.88131e-324 */
-
-    /**
-     * <p>
-     * Constant for the Not-a-Number (NaN) value of the <code>double</code> type.
-     * </p>
-     */
-	public static final double NaN = 0.0 / 0.0;
-
-    /**
-     * <p>
-     * Constant for the Positive Infinity value of the <code>double</code> type.
-     * </p>
-     */
-	public static final double POSITIVE_INFINITY = 1.0 / 0.0;
-
-    /**
-     * <p>
-     * Constant for the Negative Infinity value of the <code>double</code> type.
-     * </p>
-     */
-	public static final double NEGATIVE_INFINITY = -1.0 / 0.0;
-
-	/**
-	 * The java.lang.Class that represents this class.
-     * @since 1.1
-	 */
-    @SuppressWarnings("unchecked")
-    public static final Class<Double> TYPE = (Class<Double>) new double[0]
-            .getClass().getComponentType();
-
-	// Note: This can't be set to "double.class", since *that* is
-	// defined to be "java.lang.Double.TYPE";
-
-    /**
-     * <p>
-     * Constant for the number of bits to represent a <code>double</code> in
-     * two's compliment form.
-     * </p>
-     * 
-     * @since 1.5
-     */
-    public static final int SIZE = 64;
-    
-	/**
-	 * Constructs a new instance of the receiver which represents the double
-	 * valued argument.
-	 * 
-	 * @param value
-	 *            the double to store in the new instance.
-	 */
-	public Double(double value) {
-		this.value = value;
-	}
-
-	/**
-	 * Constructs a new instance of this class given a string.
-	 * 
-	 * @param string
-	 *            a string representation of a double quantity.
-	 * @exception NumberFormatException
-	 *                if the argument could not be parsed as a double quantity.
-	 */
-	public Double(String string) throws NumberFormatException {
-		this(parseDouble(string));
-	}
-
-	/**
-	 * Compares the receiver with the Double parameter. NaN is equal to NaN, and
-	 * is greater than other double values. 0d is greater than -0d.
-	 * 
-	 * @param object
-	 *            the Double to compare to the receiver
-	 * 
-	 * @return Returns greater than zero when this.doubleValue() is greater than
-	 *         object.doubleValue(), zero when this.doubleValue() equals
-	 *         object.doubleValue(), and less than zero when this.doubleValue()
-	 *         is less than object.doubleValue()
-     *         
-     * @throws NullPointerException if <code>object</code> is <code>null</code>.
-     * @since 1.2
-	 */
-	public int compareTo(Double object) {
-		long d1, d2;
-		long NaNbits = Double.doubleToLongBits(Double.NaN);
-		if ((d1 = Double.doubleToLongBits(value)) == NaNbits) {
-			if (Double.doubleToLongBits(object.value) == NaNbits) {
-				return 0;
-			}
-			return 1;
-		}
-		if ((d2 = Double.doubleToLongBits(object.value)) == NaNbits) {
-			return -1;
-		}
-		if (value == object.value) {
-			if (d1 == d2) {
-				return 0;
-			}
-			// check for -0
-			return d1 > d2 ? 1 : -1;
-		}
-		return value > object.value ? 1 : -1;
-	}
-
-	/**
-	 * Answers the byte value which the receiver represents
-	 * 
-	 * @return byte the value of the receiver.
-	 */
-	@Override
-    public byte byteValue() {
-		return (byte) value;
-	}
-
-	/**
-	 * Answers the binary representation of the argument, as a long.
-	 * 
-	 * @param value
-	 *            The double value to convert
-	 * @return the bits of the double.
-	 */
-	public static native long doubleToLongBits(double value);
-
-	/**
-	 * Answers the binary representation of the argument, as a long.
-	 * 
-	 * @param value
-	 *            The double value to convert
-	 * @return the bits of the double.
-	 */
-	public static native long doubleToRawLongBits(double value);
-
-	/**
-	 * Answers the receiver's value as a double.
-	 * 
-	 * @return the receiver's value
-	 */
-	@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. For
-	 * Doubles, the check verifies that the receiver's value's bit pattern
-	 * matches the bit pattern of the argument, which must also be a Double.
-	 * 
-	 * @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 Double)
-				&& (doubleToLongBits(this.value) == doubleToLongBits(((Double) object).value));
-	}
-
-	/**
-	 * Answers the float value which the receiver represents
-	 * 
-	 * @return float the value of the receiver.
-	 */
-	@Override
-    public float floatValue() {
-		return (float) 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() {
-		long v = doubleToLongBits(value);
-		return (int) (v ^ (v >>> 32));
-	}
-
-	/**
-	 * Answers the receiver's value as an integer.
-	 * 
-	 * @return the receiver's value as an integer
-	 */
-	@Override
-    public int intValue() {
-		return (int) value;
-	}
-
-	/**
-	 * Answers true if the receiver represents an infinite quantity, and false
-	 * otherwise.
-	 * 
-	 * @return <code>true</code> if the argument is positive or negative
-	 *         infinity <code>false</code> if it is not an infinite value
-	 */
-	public boolean isInfinite() {
-		return isInfinite(value);
-	}
-
-	/**
-	 * Answers true if the argument represents an infinite quantity, and false
-	 * otherwise.
-	 * 
-	 * @param d
-	 *            value to check for infinitness.
-	 * @return <code>true</code> if the argument is positive or negative
-	 *         infinity <code>false</code> if it is not an infinite value
-	 */
-	public static boolean isInfinite(double d) {
-		return (d == POSITIVE_INFINITY) || (d == NEGATIVE_INFINITY);
-	}
-
-	/**
-	 * Answers true if the receiver does not represent a valid float quantity.
-	 * 
-	 * @return <code>true</code> if the argument is Not A Number
-	 *         <code>false</code> if it is a (potentially infinite) float
-	 *         number
-	 */
-	public boolean isNaN() {
-		return isNaN(value);
-	}
-
-	/**
-	 * Answers true if the argument does not represent a valid double quantity.
-	 * 
-	 * @param d
-	 *            value to check for numberness.
-	 * @return <code>true</code> if the argument is Not A Number
-	 *         <code>false</code> if it is a (potentially infinite) double
-	 *         number
-	 */
-	public static boolean isNaN(double d) {
-		return d != d;
-	}
-
-	/**
-	 * Answers a double built from the binary representation given in the
-	 * argument.
-	 * 
-	 * @param bits
-	 *            the bits of the double
-	 * @return the double which matches the bits
-	 */
-	public static native double longBitsToDouble(long bits);
-
-	/**
-	 * Answers the long value which the receiver represents
-	 * 
-	 * @return long the value of the receiver.
-	 */
-	@Override
-    public long longValue() {
-		return (long) value;
-	}
-
-	/**
-	 * Answers the double which matches the passed in string.
-	 * NumberFormatException is thrown if the string does not represent a valid
-	 * double.
-	 * 
-	 * @param string
-	 *            the value to convert
-	 * @return a double which would print as the argument
-	 */
-	public static double parseDouble(String string)
-			throws NumberFormatException {
-		return org.apache.harmony.luni.util.FloatingPointParser.parseDouble(string);
-	}
-
-	/**
-	 * Answers the short value which the receiver represents
-	 * 
-	 * @return short the value of the receiver.
-	 */
-	@Override
-    public short shortValue() {
-		return (short) 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 Double.toString(value);
-	}
-
-	/**
-	 * Answers a string containing a printable representation of the argument.
-	 * 
-	 * @param d
-	 *            the double to print
-	 * @return a printable representation of the argument.
-	 */
-	public static String toString(double d) {
-		return org.apache.harmony.luni.util.NumberConverter.convert(d);
-	}
-
-	/**
-	 * Answers the double which matches the passed in string.
-	 * NumberFormatException is thrown if the string does not represent a valid
-	 * double.
-	 * 
-	 * @param string
-	 *            the value to convert
-	 * @return a double which would print as the argument
-	 */
-	public static Double valueOf(String string) throws NumberFormatException {
-		return new Double(parseDouble(string));
-	}
-
-	/**
-	 * Compares the two doubles. NaN is equal to NaN, and is greater than other
-	 * double values. 0d is greater than -0d.
-	 * 
-	 * @param double1
-	 *            the first value to compare
-	 * @param double2
-	 *            the second value to compare
-	 * 
-	 * @return Returns greater than zero when double1 is greater than double2,
-	 *         zero when double1 equals double2, and less than zero when double1
-	 *         is less than double2
-	 */
-	public static int compare(double double1, double double2) {
-		long d1, d2;
-		long NaNbits = Double.doubleToLongBits(Double.NaN);
-		if ((d1 = Double.doubleToLongBits(double1)) == NaNbits) {
-			if (Double.doubleToLongBits(double2) == NaNbits) {
-				return 0;
-			}
-			return 1;
-		}
-		if ((d2 = Double.doubleToLongBits(double2)) == NaNbits) {
-			return -1;
-		}
-		if (double1 == double2) {
-			if (d1 == d2) {
-				return 0;
-			}
-			// check for -0
-			return d1 > d2 ? 1 : -1;
-		}
-		return double1 > double2 ? 1 : -1;
-	}
-    
-    /**
-     * <p>
-     * Returns a <code>Double</code> instance for the <code>double</code>
-     * value passed. This method is preferred over the constructor, as this
-     * method may maintain a cache of instances.
-     * </p>
-     * 
-     * @param d The double value.
-     * @return A <code>Double</code> instance.
-     * @since 1.5
-     */
-    public static Double valueOf(double d) {
-        return new Double(d);
-    }
-
-    /**
-     * <p>
-     * Converts a <code>double</code> into a hexadecimal string representation.
-     * </p>
-     * 
-     * @param d The <code>double</code> to convert.
-     * @return The hexadecimal string representation of <code>f</code>.
-     * @since 1.5
-     */
-    public static String toHexString(double d) {
-        /*
-         * Reference: http://en.wikipedia.org/wiki/IEEE_754
-         */
-        if (d != d) {
-            return "NaN";
-        }
-        if (d == POSITIVE_INFINITY) {
-            return "Infinity";
-        }
-        if (d == NEGATIVE_INFINITY) {
-            return "-Infinity";
-        }
-
-        long bitValue = doubleToLongBits(d);
-
-        boolean negative = (bitValue & 0x8000000000000000L) != 0;
-        // mask exponent bits and shift down
-        long exponent = (bitValue & 0x7FF0000000000000L) >>> 52;
-        // mask significand bits and shift up
-        long significand = bitValue & 0x000FFFFFFFFFFFFFL;
-
-        if (exponent == 0 && significand == 0) {
-            return (negative ? "-0x0.0p0" : "0x0.0p0");
-        }
-
-        StringBuilder hexString = new StringBuilder(10);
-        if (negative) {
-            hexString.append("-0x");
-        } else {
-            hexString.append("0x");
-        }
-
-        if (exponent == 0) { // denormal (subnormal) value
-            hexString.append("0.");
-            // significand is 52-bits, so there can be 13 hex digits
-            int fractionDigits = 13;
-            // remove trailing hex zeros, so Integer.toHexString() won't print
-            // them
-            while ((significand != 0) && ((significand & 0xF) == 0)) {
-                significand >>>= 4;
-                fractionDigits--;
-            }
-            // this assumes Integer.toHexString() returns lowercase characters
-            String hexSignificand = Long.toHexString(significand);
-
-            // if there are digits left, then insert some '0' chars first
-            if (fractionDigits > hexSignificand.length()) {
-                int digitDiff = fractionDigits - hexSignificand.length();
-                while (digitDiff-- != 0) {
-                    hexString.append('0');
-                }
-            }
-            hexString.append(hexSignificand);
-            hexString.append("p-1022");
-        } else { // normal value
-            hexString.append("1.");
-            // remove trailing hex zeros, so Integer.toHexString() won't print
-            // them
-            while ((significand != 0) && ((significand & 0xF) == 0)) {
-                significand >>>= 4;
-            }
-            // this assumes Integer.toHexString() returns lowercase characters
-            String hexSignificand = Long.toHexString(significand);
-
-            hexString.append(hexSignificand);
-            hexString.append('p');
-            // remove exponent's 'bias' and convert to a string
-            hexString.append(Long.toString(exponent - 1023));
-        }
-        return hexString.toString();
-    }
-}
+/* 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>
+ * Double is the wrapper for the primitive type <code>double</code>.
+ * </p>
+ * 
+ * @see java.lang.Number
+ * @since 1.0
+ */
+public final class Double extends Number implements Comparable<Double> {
+
+	private static final long serialVersionUID = -9172774392245257468L;
+
+	/**
+	 * The value which the receiver represents.
+	 */
+	private final double value;
+
+    /**
+     * <p>
+     * Constant for the maximum <code>double</code> value, (2 - 2<sup>-52/sup>) * 2<sup>1023</sup>.
+     * </p>
+     */
+	public static final double MAX_VALUE = 1.79769313486231570e+308;
+
+    /**
+     * <p>
+     * Constant for the minimum <code>double</code> value, 2<sup>-1074</sup>.
+     * </p>
+     */
+	public static final double MIN_VALUE = 5e-324;
+
+	/* 4.94065645841246544e-324 gets rounded to 9.88131e-324 */
+
+    /**
+     * <p>
+     * Constant for the Not-a-Number (NaN) value of the <code>double</code> type.
+     * </p>
+     */
+	public static final double NaN = 0.0 / 0.0;
+
+    /**
+     * <p>
+     * Constant for the Positive Infinity value of the <code>double</code> type.
+     * </p>
+     */
+	public static final double POSITIVE_INFINITY = 1.0 / 0.0;
+
+    /**
+     * <p>
+     * Constant for the Negative Infinity value of the <code>double</code> type.
+     * </p>
+     */
+	public static final double NEGATIVE_INFINITY = -1.0 / 0.0;
+
+	/**
+	 * The java.lang.Class that represents this class.
+     * @since 1.1
+	 */
+    @SuppressWarnings("unchecked")
+    public static final Class<Double> TYPE = (Class<Double>) new double[0]
+            .getClass().getComponentType();
+
+	// Note: This can't be set to "double.class", since *that* is
+	// defined to be "java.lang.Double.TYPE";
+
+    /**
+     * <p>
+     * Constant for the number of bits to represent a <code>double</code> in
+     * two's compliment form.
+     * </p>
+     * 
+     * @since 1.5
+     */
+    public static final int SIZE = 64;
+    
+	/**
+	 * Constructs a new instance of the receiver which represents the double
+	 * valued argument.
+	 * 
+	 * @param value
+	 *            the double to store in the new instance.
+	 */
+	public Double(double value) {
+		this.value = value;
+	}
+
+	/**
+	 * Constructs a new instance of this class given a string.
+	 * 
+	 * @param string
+	 *            a string representation of a double quantity.
+	 * @exception NumberFormatException
+	 *                if the argument could not be parsed as a double quantity.
+	 */
+	public Double(String string) throws NumberFormatException {
+		this(parseDouble(string));
+	}
+
+	/**
+	 * Compares the receiver with the Double parameter. NaN is equal to NaN, and
+	 * is greater than other double values. 0d is greater than -0d.
+	 * 
+	 * @param object
+	 *            the Double to compare to the receiver
+	 * 
+	 * @return Returns greater than zero when this.doubleValue() is greater than
+	 *         object.doubleValue(), zero when this.doubleValue() equals
+	 *         object.doubleValue(), and less than zero when this.doubleValue()
+	 *         is less than object.doubleValue()
+     *         
+     * @throws NullPointerException if <code>object</code> is <code>null</code>.
+     * @since 1.2
+	 */
+	public int compareTo(Double object) {
+		long d1, d2;
+		long NaNbits = Double.doubleToLongBits(Double.NaN);
+		if ((d1 = Double.doubleToLongBits(value)) == NaNbits) {
+			if (Double.doubleToLongBits(object.value) == NaNbits) {
+				return 0;
+			}
+			return 1;
+		}
+		if ((d2 = Double.doubleToLongBits(object.value)) == NaNbits) {
+			return -1;
+		}
+		if (value == object.value) {
+			if (d1 == d2) {
+				return 0;
+			}
+			// check for -0
+			return d1 > d2 ? 1 : -1;
+		}
+		return value > object.value ? 1 : -1;
+	}
+
+	/**
+	 * Answers the byte value which the receiver represents
+	 * 
+	 * @return byte the value of the receiver.
+	 */
+	@Override
+    public byte byteValue() {
+		return (byte) value;
+	}
+
+	/**
+	 * Answers the binary representation of the argument, as a long.
+	 * 
+	 * @param value
+	 *            The double value to convert
+	 * @return the bits of the double.
+	 */
+	public static native long doubleToLongBits(double value);
+
+	/**
+	 * Answers the binary representation of the argument, as a long.
+	 * 
+	 * @param value
+	 *            The double value to convert
+	 * @return the bits of the double.
+	 */
+	public static native long doubleToRawLongBits(double value);
+
+	/**
+	 * Answers the receiver's value as a double.
+	 * 
+	 * @return the receiver's value
+	 */
+	@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. For
+	 * Doubles, the check verifies that the receiver's value's bit pattern
+	 * matches the bit pattern of the argument, which must also be a Double.
+	 * 
+	 * @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 Double)
+				&& (doubleToLongBits(this.value) == doubleToLongBits(((Double) object).value));
+	}
+
+	/**
+	 * Answers the float value which the receiver represents
+	 * 
+	 * @return float the value of the receiver.
+	 */
+	@Override
+    public float floatValue() {
+		return (float) 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() {
+		long v = doubleToLongBits(value);
+		return (int) (v ^ (v >>> 32));
+	}
+
+	/**
+	 * Answers the receiver's value as an integer.
+	 * 
+	 * @return the receiver's value as an integer
+	 */
+	@Override
+    public int intValue() {
+		return (int) value;
+	}
+
+	/**
+	 * Answers true if the receiver represents an infinite quantity, and false
+	 * otherwise.
+	 * 
+	 * @return <code>true</code> if the argument is positive or negative
+	 *         infinity <code>false</code> if it is not an infinite value
+	 */
+	public boolean isInfinite() {
+		return isInfinite(value);
+	}
+
+	/**
+	 * Answers true if the argument represents an infinite quantity, and false
+	 * otherwise.
+	 * 
+	 * @param d
+	 *            value to check for infinitness.
+	 * @return <code>true</code> if the argument is positive or negative
+	 *         infinity <code>false</code> if it is not an infinite value
+	 */
+	public static boolean isInfinite(double d) {
+		return (d == POSITIVE_INFINITY) || (d == NEGATIVE_INFINITY);
+	}
+
+	/**
+	 * Answers true if the receiver does not represent a valid float quantity.
+	 * 
+	 * @return <code>true</code> if the argument is Not A Number
+	 *         <code>false</code> if it is a (potentially infinite) float
+	 *         number
+	 */
+	public boolean isNaN() {
+		return isNaN(value);
+	}
+
+	/**
+	 * Answers true if the argument does not represent a valid double quantity.
+	 * 
+	 * @param d
+	 *            value to check for numberness.
+	 * @return <code>true</code> if the argument is Not A Number
+	 *         <code>false</code> if it is a (potentially infinite) double
+	 *         number
+	 */
+	public static boolean isNaN(double d) {
+		return d != d;
+	}
+
+	/**
+	 * Answers a double built from the binary representation given in the
+	 * argument.
+	 * 
+	 * @param bits
+	 *            the bits of the double
+	 * @return the double which matches the bits
+	 */
+	public static native double longBitsToDouble(long bits);
+
+	/**
+	 * Answers the long value which the receiver represents
+	 * 
+	 * @return long the value of the receiver.
+	 */
+	@Override
+    public long longValue() {
+		return (long) value;
+	}
+
+	/**
+	 * Answers the double which matches the passed in string.
+	 * NumberFormatException is thrown if the string does not represent a valid
+	 * double.
+	 * 
+	 * @param string
+	 *            the value to convert
+	 * @return a double which would print as the argument
+	 */
+	public static double parseDouble(String string)
+			throws NumberFormatException {
+		return org.apache.harmony.luni.util.FloatingPointParser.parseDouble(string);
+	}
+
+	/**
+	 * Answers the short value which the receiver represents
+	 * 
+	 * @return short the value of the receiver.
+	 */
+	@Override
+    public short shortValue() {
+		return (short) 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 Double.toString(value);
+	}
+
+	/**
+	 * Answers a string containing a printable representation of the argument.
+	 * 
+	 * @param d
+	 *            the double to print
+	 * @return a printable representation of the argument.
+	 */
+	public static String toString(double d) {
+		return org.apache.harmony.luni.util.NumberConverter.convert(d);
+	}
+
+	/**
+	 * Answers the double which matches the passed in string.
+	 * NumberFormatException is thrown if the string does not represent a valid
+	 * double.
+	 * 
+	 * @param string
+	 *            the value to convert
+	 * @return a double which would print as the argument
+	 */
+	public static Double valueOf(String string) throws NumberFormatException {
+		return new Double(parseDouble(string));
+	}
+
+	/**
+	 * Compares the two doubles. NaN is equal to NaN, and is greater than other
+	 * double values. 0d is greater than -0d.
+	 * 
+	 * @param double1
+	 *            the first value to compare
+	 * @param double2
+	 *            the second value to compare
+	 * 
+	 * @return Returns greater than zero when double1 is greater than double2,
+	 *         zero when double1 equals double2, and less than zero when double1
+	 *         is less than double2
+	 */
+	public static int compare(double double1, double double2) {
+		long d1, d2;
+		long NaNbits = Double.doubleToLongBits(Double.NaN);
+		if ((d1 = Double.doubleToLongBits(double1)) == NaNbits) {
+			if (Double.doubleToLongBits(double2) == NaNbits) {
+				return 0;
+			}
+			return 1;
+		}
+		if ((d2 = Double.doubleToLongBits(double2)) == NaNbits) {
+			return -1;
+		}
+		if (double1 == double2) {
+			if (d1 == d2) {
+				return 0;
+			}
+			// check for -0
+			return d1 > d2 ? 1 : -1;
+		}
+		return double1 > double2 ? 1 : -1;
+	}
+    
+    /**
+     * <p>
+     * Returns a <code>Double</code> instance for the <code>double</code>
+     * value passed. This method is preferred over the constructor, as this
+     * method may maintain a cache of instances.
+     * </p>
+     * 
+     * @param d The double value.
+     * @return A <code>Double</code> instance.
+     * @since 1.5
+     */
+    public static Double valueOf(double d) {
+        return new Double(d);
+    }
+
+    /**
+     * <p>
+     * Converts a <code>double</code> into a hexadecimal string representation.
+     * </p>
+     * 
+     * @param d The <code>double</code> to convert.
+     * @return The hexadecimal string representation of <code>f</code>.
+     * @since 1.5
+     */
+    public static String toHexString(double d) {
+        /*
+         * Reference: http://en.wikipedia.org/wiki/IEEE_754
+         */
+        if (d != d) {
+            return "NaN";
+        }
+        if (d == POSITIVE_INFINITY) {
+            return "Infinity";
+        }
+        if (d == NEGATIVE_INFINITY) {
+            return "-Infinity";
+        }
+
+        long bitValue = doubleToLongBits(d);
+
+        boolean negative = (bitValue & 0x8000000000000000L) != 0;
+        // mask exponent bits and shift down
+        long exponent = (bitValue & 0x7FF0000000000000L) >>> 52;
+        // mask significand bits and shift up
+        long significand = bitValue & 0x000FFFFFFFFFFFFFL;
+
+        if (exponent == 0 && significand == 0) {
+            return (negative ? "-0x0.0p0" : "0x0.0p0");
+        }
+
+        StringBuilder hexString = new StringBuilder(10);
+        if (negative) {
+            hexString.append("-0x");
+        } else {
+            hexString.append("0x");
+        }
+
+        if (exponent == 0) { // denormal (subnormal) value
+            hexString.append("0.");
+            // significand is 52-bits, so there can be 13 hex digits
+            int fractionDigits = 13;
+            // remove trailing hex zeros, so Integer.toHexString() won't print
+            // them
+            while ((significand != 0) && ((significand & 0xF) == 0)) {
+                significand >>>= 4;
+                fractionDigits--;
+            }
+            // this assumes Integer.toHexString() returns lowercase characters
+            String hexSignificand = Long.toHexString(significand);
+
+            // if there are digits left, then insert some '0' chars first
+            if (fractionDigits > hexSignificand.length()) {
+                int digitDiff = fractionDigits - hexSignificand.length();
+                while (digitDiff-- != 0) {
+                    hexString.append('0');
+                }
+            }
+            hexString.append(hexSignificand);
+            hexString.append("p-1022");
+        } else { // normal value
+            hexString.append("1.");
+            // remove trailing hex zeros, so Integer.toHexString() won't print
+            // them
+            while ((significand != 0) && ((significand & 0xF) == 0)) {
+                significand >>>= 4;
+            }
+            // this assumes Integer.toHexString() returns lowercase characters
+            String hexSignificand = Long.toHexString(significand);
+
+            hexString.append(hexSignificand);
+            hexString.append('p');
+            // remove exponent's 'bias' and convert to a string
+            hexString.append(Long.toString(exponent - 1023));
+        }
+        return hexString.toString();
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Double.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/EnumConstantNotPresentException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/EnumConstantNotPresentException.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/EnumConstantNotPresentException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/EnumConstantNotPresentException.java Sun Aug 20 13:54:27 2006
@@ -1,75 +1,75 @@
-/* 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;
-
-/**
- * <p>
- * Indicates that an <code>enum</code> constant does not exist for a
- * particular name.
- * </p>
- * 
- * @since 1.5
- * @author Nathan Beyer (Harmony)
- */
-public class EnumConstantNotPresentException extends RuntimeException {
-
-    private static final long serialVersionUID = -6046998521960521108L;
-
-    @SuppressWarnings("unchecked")
-    private final Class<? extends Enum> enumType;
-
-    private final String constantName;
-
-    /**
-     * <p>
-     * Constructs an instance for the passed enum and constant name.
-     * </p>
-     * 
-     * @param enumType The enum type.
-     * @param constantName The missing constant name.
-     */
-    @SuppressWarnings("unchecked")
-    public EnumConstantNotPresentException(Class<? extends Enum> enumType,
-            String constantName) {
-        super("The enum constant " + enumType.getName() + "." + constantName
-                + " is missing.");
-        this.enumType = enumType;
-        this.constantName = constantName;
-    }
-
-    /**
-     * <p>
-     * The enum type from which the constant name is missing.
-     * </p>
-     * 
-     * @return A <code>Class</code> instance.
-     */
-    @SuppressWarnings("unchecked")
-    public Class<? extends Enum> enumType() {
-        return enumType;
-    }
-
-    /**
-     * <p>
-     * The name of the constant missing.
-     * </p>
-     * 
-     * @return A <code>String</code> instance.
-     */
-    public String constantName() {
-        return constantName;
-    }
-}
+/* 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;
+
+/**
+ * <p>
+ * Indicates that an <code>enum</code> constant does not exist for a
+ * particular name.
+ * </p>
+ * 
+ * @since 1.5
+ * @author Nathan Beyer (Harmony)
+ */
+public class EnumConstantNotPresentException extends RuntimeException {
+
+    private static final long serialVersionUID = -6046998521960521108L;
+
+    @SuppressWarnings("unchecked")
+    private final Class<? extends Enum> enumType;
+
+    private final String constantName;
+
+    /**
+     * <p>
+     * Constructs an instance for the passed enum and constant name.
+     * </p>
+     * 
+     * @param enumType The enum type.
+     * @param constantName The missing constant name.
+     */
+    @SuppressWarnings("unchecked")
+    public EnumConstantNotPresentException(Class<? extends Enum> enumType,
+            String constantName) {
+        super("The enum constant " + enumType.getName() + "." + constantName
+                + " is missing.");
+        this.enumType = enumType;
+        this.constantName = constantName;
+    }
+
+    /**
+     * <p>
+     * The enum type from which the constant name is missing.
+     * </p>
+     * 
+     * @return A <code>Class</code> instance.
+     */
+    @SuppressWarnings("unchecked")
+    public Class<? extends Enum> enumType() {
+        return enumType;
+    }
+
+    /**
+     * <p>
+     * The name of the constant missing.
+     * </p>
+     * 
+     * @return A <code>String</code> instance.
+     */
+    public String constantName() {
+        return constantName;
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/EnumConstantNotPresentException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Error.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Error.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Error.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Error.java Sun Aug 20 13:54:27 2006
@@ -1,73 +1,73 @@
-/* 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;
-
-
-/**
- * This class is the superclass of all classes which represent unrecoverable
- * errors. When Errors are thrown, they should not be caught by application
- * code.
- * 
- * @see Throwable
- * @see Exception
- * @see RuntimeException
- */
-public class Error extends Throwable {
-
-	private static final long serialVersionUID = 4980196508277280342L;
-
-	/**
-	 * Constructs a new instance of this class with its walkback filled in.
-	 */
-	public Error() {
-		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 Error(String detailMessage) {
-		super(detailMessage);
-	}
-
-	/**
-	 * Constructs a new instance of this class with its walkback, message and
-	 * cause filled in.
-	 * 
-	 * @param detailMessage
-	 *            String The detail message for the exception.
-	 * @param throwable
-	 *            The cause of this Throwable
-	 */
-	public Error(String detailMessage, Throwable throwable) {
-		super(detailMessage, throwable);
-	}
-
-	/**
-	 * Constructs a new instance of this class with its walkback and cause
-	 * filled in.
-	 * 
-	 * @param throwable
-	 *            The cause of this Throwable
-	 */
-	public Error(Throwable throwable) {
-		super(throwable);
-	}
-}
+/* 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;
+
+
+/**
+ * This class is the superclass of all classes which represent unrecoverable
+ * errors. When Errors are thrown, they should not be caught by application
+ * code.
+ * 
+ * @see Throwable
+ * @see Exception
+ * @see RuntimeException
+ */
+public class Error extends Throwable {
+
+	private static final long serialVersionUID = 4980196508277280342L;
+
+	/**
+	 * Constructs a new instance of this class with its walkback filled in.
+	 */
+	public Error() {
+		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 Error(String detailMessage) {
+		super(detailMessage);
+	}
+
+	/**
+	 * Constructs a new instance of this class with its walkback, message and
+	 * cause filled in.
+	 * 
+	 * @param detailMessage
+	 *            String The detail message for the exception.
+	 * @param throwable
+	 *            The cause of this Throwable
+	 */
+	public Error(String detailMessage, Throwable throwable) {
+		super(detailMessage, throwable);
+	}
+
+	/**
+	 * Constructs a new instance of this class with its walkback and cause
+	 * filled in.
+	 * 
+	 * @param throwable
+	 *            The cause of this Throwable
+	 */
+	public Error(Throwable throwable) {
+		super(throwable);
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Error.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Exception.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Exception.java?rev=433041&r1=433040&r2=433041&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Exception.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Exception.java Sun Aug 20 13:54:27 2006
@@ -1,72 +1,72 @@
-/* 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;
-
-
-/**
- * This class is the superclass of all classes which represent recoverable
- * exceptions. When Exceptions are thrown, they may be caught by application
- * code.
- * 
- * @see Throwable
- * @see Error
- * @see RuntimeException
- */
-public class Exception extends Throwable {
-	private static final long serialVersionUID = -3387516993124229948L;
-
-	/**
-	 * Constructs a new instance of this class with its walkback filled in.
-	 */
-	public Exception() {
-		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 Exception(String detailMessage) {
-		super(detailMessage);
-	}
-
-	/**
-	 * Constructs a new instance of this class with its walkback, message and
-	 * cause filled in.
-	 * 
-	 * @param detailMessage
-	 *            String The detail message for the exception.
-	 * @param throwable
-	 *            The cause of this Throwable
-	 */
-	public Exception(String detailMessage, Throwable throwable) {
-		super(detailMessage, throwable);
-	}
-
-	/**
-	 * Constructs a new instance of this class with its walkback and cause
-	 * filled in.
-	 * 
-	 * @param throwable
-	 *            The cause of this Throwable
-	 */
-	public Exception(Throwable throwable) {
-		super(throwable);
-	}
-}
+/* 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;
+
+
+/**
+ * This class is the superclass of all classes which represent recoverable
+ * exceptions. When Exceptions are thrown, they may be caught by application
+ * code.
+ * 
+ * @see Throwable
+ * @see Error
+ * @see RuntimeException
+ */
+public class Exception extends Throwable {
+	private static final long serialVersionUID = -3387516993124229948L;
+
+	/**
+	 * Constructs a new instance of this class with its walkback filled in.
+	 */
+	public Exception() {
+		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 Exception(String detailMessage) {
+		super(detailMessage);
+	}
+
+	/**
+	 * Constructs a new instance of this class with its walkback, message and
+	 * cause filled in.
+	 * 
+	 * @param detailMessage
+	 *            String The detail message for the exception.
+	 * @param throwable
+	 *            The cause of this Throwable
+	 */
+	public Exception(String detailMessage, Throwable throwable) {
+		super(detailMessage, throwable);
+	}
+
+	/**
+	 * Constructs a new instance of this class with its walkback and cause
+	 * filled in.
+	 * 
+	 * @param throwable
+	 *            The cause of this Throwable
+	 */
+	public Exception(Throwable throwable) {
+		super(throwable);
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Exception.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message