Revision: 3618
          http://vexi.svn.sourceforge.net/vexi/?rev=3618&view=rev
Author:   clrg
Date:     2009-08-24 12:54:10 +0000 (Mon, 24 Aug 2009)

Log Message:
-----------
Number/Boolean documentation placeholders

Modified Paths:
--------------
    trunk/core/org.ibex.js/src/org/ibex/js/JSNumber.java

Modified: trunk/core/org.ibex.js/src/org/ibex/js/JSNumber.java
===================================================================
--- trunk/core/org.ibex.js/src/org/ibex/js/JSNumber.java        2009-08-21 
02:44:38 UTC (rev 3617)
+++ trunk/core/org.ibex.js/src/org/ibex/js/JSNumber.java        2009-08-24 
12:54:10 UTC (rev 3618)
@@ -7,23 +7,41 @@
 public abstract class JSNumber extends JSPrimitive {
        static public JS Constructor = new JS.Constructor("Number");
     public boolean equals(Object o) {
-        if(o == this) return true;
-        if(o instanceof JSNumber) {
+        if (o == this) {
+            return true;
+        }
+        if (o instanceof JSNumber) {
             JSNumber n = (JSNumber) o;
-            if(this instanceof D || n instanceof D) return n.toDouble() == 
toDouble();
+            if (this instanceof D || n instanceof D) {
+                return n.toDouble() == toDouble();
+            }
             return n.toLong() == toLong();
-        } else if(o instanceof JSString) {
+        }
+        if (o instanceof JSString) {
             String s = ((JSString)o).s.trim();
             try {
-                if(this instanceof D || s.indexOf('.') != -1) return 
Double.parseDouble(s) == toDouble();
+                if (this instanceof D || s.indexOf('.') != -1) {
+                    return Double.parseDouble(s) == toDouble();
+                }
                 return Long.parseLong(s) == toLong();
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 return false;
             }
-        } else {
-            return false;
         }
+        return false;
     }
+
+    public JS get(JS key) throws JSExn {
+        //#noswitch - leave, needed for jsdoc
+        /*...@page(varname=Number,humanname=Numbers)
+         * 
+         * <p>TODO</p> 
+         *  
+         * */ 
+        //#end
+        return super.get(key);
+    }
+    
     // FEATURE: Better hash function? (if d != (int) d then do something 
double specific)
     public int hashCode() { return toInt(); }
     
@@ -64,9 +82,19 @@
         B(boolean b) { this.b = b; }
         int toInt() { return b ? 1 : 0; }
         public String coerceToString() { return b ? "true" : "false"; }
-        public JS type() { return SC_boolean;}
-        public boolean instanceOf(JS constructor){ return 
constructor==Constructor; }
+        public JS type() { return SC_boolean; }
+        public boolean instanceOf(JS constructor) { return 
constructor==Constructor; }
+        public JS get(JS key) throws JSExn {
+            //#noswitch - leave, needed for jsdoc
+            /*...@page(varname=Boolean,humanname=Booleans)
+             * 
+             * <p>TODO</p> 
+             *  
+             * */ 
+            //#end
+            return super.get(key);
+        }
     }
-    public JS type() { return SC_number;}
-    public boolean instanceOf(JS constructor){ return 
constructor==Constructor; }
+    public JS type() { return SC_number; }
+    public boolean instanceOf(JS constructor) { return 
constructor==Constructor; }
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to