NumberParser (Java)

Java version of NumberParser, the FlexibleParser part which deals with numbers
NumberParser is a .NET parsing library easing the management of numeric types and supporting various custom mathematical methods. It is the second part of FlexibleParser. This page refers to the Java version, a conversion of the code which I originally developed in C#.

You can take a look at (ready to be used with Eclipse), download () or , or read .

To use NumberParser.jar (or NumberParser_without_javadoc.jar), just add it to your project and use the resources in the NumberParser package. Additionally to reading the readme file, you should also take a look at to get a proper idea about its main features.

By bearing in mind the multiple sintax similarities between Java and C#, you might be interested in analysing the resources associated with (e.g., ). In any case, note that the Java version doesn't include the following aspects present in the .NET one:
  • No custom operators. All the arithmetic operations are performed via the corresponding NumberX (i.e., Number, NumberD, NumberO and NumberP) methods like Number.Addition.
  • No reliance on the decimal type. The main numeric type is double (or Double).
  • No implicit conversions between NumberX instances.
  • Math2.PowDecimal and Math2.SqrtDecimal relying on the in-built implementations (i.e., Math.pow and Math.sqrt) rather than on the which I developed for the original C# version.
The last stable version of NumberParser.jar and NumberParser_without_javadoc.jar is 1.0.8.5 (equivalent to the .NET/C# version 1.0.8.5).