axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r513363 - in /webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types: UnsignedByte.java UnsignedInt.java UnsignedLong.java UnsignedShort.java
Date Thu, 01 Mar 2007 15:02:54 GMT
Author: dug
Date: Thu Mar  1 07:02:52 2007
New Revision: 513363

URL: http://svn.apache.org/viewvc?view=rev&rev=513363
Log:
sync with head

Modified:
    webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedByte.java
    webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedInt.java
    webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedLong.java
    webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedShort.java

Modified: webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedByte.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedByte.java?view=diff&rev=513363&r1=513362&r2=513363
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedByte.java
(original)
+++ webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedByte.java
Thu Mar  1 07:02:52 2007
@@ -69,4 +69,8 @@
         return true;
     }
 
+    public int compareTo(Object obj) {
+        return compareTo((UnsignedByte)obj);
+    }
+
 }

Modified: webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedInt.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedInt.java?view=diff&rev=513363&r1=513362&r2=513363
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedInt.java (original)
+++ webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedInt.java Thu
Mar  1 07:02:52 2007
@@ -106,13 +106,23 @@
 
     // implement java.lang.comparable interface
     public int compareTo(Object obj) {
-      if (lValue != null)
-        return lValue.compareTo(obj);
-      else
-        if (equals(obj) == true)
-            return 0;  // null == null
-        else
-            return 1;  // object is greater
+        return compareTo((UnsignedInt)obj);
+    }
+
+    public int compareTo(UnsignedInt o) {
+        if (lValue == null) {
+            if (o.lValue == null) {
+                return 0;
+            } else {
+                return -1;
+            }
+        } else {
+            if (o.lValue == null) {
+                return 1;
+            } else {
+                return lValue.compareTo(o.lValue);
+            }
+        }
     }
 
     // Implement java.lang.Number interface

Modified: webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedLong.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedLong.java?view=diff&rev=513363&r1=513362&r2=513363
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedLong.java
(original)
+++ webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedLong.java
Thu Mar  1 07:02:52 2007
@@ -100,12 +100,23 @@
 
     // implement java.lang.comparable interface
     public int compareTo(Object obj) {
-        if (lValue != null)
-            return lValue.compareTo(obj);
-        else if (equals(obj) == true)
-            return 0;  // null == null
-        else
-            return 1;  // object is greater
+        return compareTo((UnsignedLong)obj);
+    }
+
+    public int compareTo(UnsignedLong o) {
+        if (lValue == null) {
+            if (o.lValue == null) {
+                return 0;
+            } else {
+                return -1;
+            }
+        } else {
+            if (o.lValue == null) {
+                return 1;
+            } else {
+                return lValue.compareTo(o.lValue);
+            }
+        }
     }
 
     // Implement java.lang.Number interface

Modified: webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedShort.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedShort.java?view=diff&rev=513363&r1=513362&r2=513363
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedShort.java
(original)
+++ webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/types/UnsignedShort.java
Thu Mar  1 07:02:52 2007
@@ -67,4 +67,8 @@
         return true;
     }
 
+    public int compareTo(Object obj) {
+        return compareTo((UnsignedShort)obj);
+    }
+
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message