2003/06/28 06:57:09
[org.ibex.core.git] / src / org / xwt / js / JS.java
index be82e70..9cd65ee 100644 (file)
@@ -41,6 +41,9 @@ public abstract class JS {
     /** coerce an object to a Long */
     public static long toLong(Object o) { return toNumber(o).longValue(); }
 
+    /** coerce an object to an Int */
+    public static int toInt(Object o) { return toNumber(o).intValue(); }
+
     /** coerce an object to a Double */
     public static double toDouble(Object o) { return toNumber(o).doubleValue(); }