Missing Byte.shortValue()

Petter Reinholdtsen pere at cc.uit.no
Wed Sep 16 06:55:14 PDT 1998


Here is a patch to implement the missing java.lang.Byte.shortValue().

Index: ChangeLog
===================================================================
RCS file: /home/cvspublic/kaffe/ChangeLog,v
retrieving revision 1.133
diff -u -r1.133 ChangeLog
--- ChangeLog   1998/09/15 12:30:08     1.133
+++ ChangeLog   1998/09/17 04:42:00
@@ -1,3 +1,9 @@
+Tue Sep 15 23:33:25 1998  Petter Reinholdtsen <pere at td.org.uit.no>
+
+       * libraries/javalib/java/lang/Byte.java
+       Implemented shortValue().  Moved {float|double}Value() together
+       with all the other -Value() methods.
+       
 Mon Sep 14 15:37:04 1998  Alexandre Oliva  <oliva at dcc.unicamp.br>
 
        * libraries/clib/zip/Deflater.c
Index: libraries/javalib/java/lang/Byte.java
===================================================================
RCS file: /home/cvspublic/kaffe/libraries/javalib/java/lang/Byte.java,v
retrieving revision 1.3
diff -u -r1.3 Byte.java
--- Byte.java   1998/09/08 05:19:23     1.3
+++ libraries/javalib/java/lang/Byte.java   1998/09/17 04:42:07
@@ -47,11 +47,6 @@
        return new Byte(val);
 }
 
-public double doubleValue()
-       {
-       return ((double)val);
-}
-
 public boolean equals(Object obj)
        {
        try {
@@ -64,11 +59,6 @@
        return (false);
 }
 
-public float floatValue()
-       {
-       return ((float)val);
-}
-
 public int hashCode()
        {
        return (val);   // What should this be do you suppose ???
@@ -79,6 +69,11 @@
        return (val);
 }
 
+public short shortValue()
+       {
+       return ((short)val);
+}
+
 public int intValue()
        {
        return ((int)val);
@@ -87,6 +82,16 @@
 public long longValue()
        {
        return ((long)val);
+}
+
+public float floatValue()
+       {
+       return ((float)val);
+}
+
+public double doubleValue()
+       {
+       return ((double)val);
 }
 
 public static byte parseByte(String s) throws NumberFormatException
-- 
##>  Petter Reinholdtsen <##    | pere at td.org.uit.no
 O-  <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/    | Go Mozilla, go! Go!


More information about the kaffe mailing list