|
|
gwt-math 2.0
Summary
The goal of gwt-math is to provide drop in support for an extended set of the of the standard Java library classes on top of what is provided by the GWT distribution provided by Google.
GettingStarted
The only thing to do in our GWT Module is:
- to inherit the gwt-math into the gwt.xml
<inherits name="com.googlecode.gwt.math.Math"/>
- download the jar from the download section and add it into classpath
- download the server.jar from the download section and add it into classpath of server project to enable RPC call
Now you can use the java.math.BigDecimal and java.math.BigInteger into the GWT Module.
JRE Emulation
java.math.BigDecimal
- BigDecimal() , BigDecimal(String) ,add(BigDecimal) ,subtract(BigDecimal) ,multiply(BigDecimal) ,divide(BigDecimal, int, int) ,divide(BigDecimal, int) ,abs() ,negate() ,signum() ,scale() ,unscaledValue() ,setScale(int, int) ,setScale(int) ,compareTo(BigDecimal) ,compareTo(Object) ,equals(Object) ,min(BigDecimal) ,max(BigDecimal) ,hashCode() ,toString() ,toBigInteger() ,intValue()
java.math.BigInteger
- BigInteger() , BigInteger(String) , add(BigInteger) , subtract(BigInteger) , multiply(BigInteger) , divide(BigInteger) , divideAndRemainder(BigInteger) , remainder(BigInteger) , abs() , negate() , signum() , clone(int[]) , compareTo(BigInteger) , compareTo(Object) , equals(Object) , min(BigInteger) , max(BigInteger) , hashCode() , toString() , intValue()
Example Project
You can find a sample Eclipse project in the SVN
Note
In the first version were found critical anomalies if used in WebMode. It is recommended to download the 2.0 version that works better.
