Package host.fai.lib.faiNumber
host.fai.lib.faiNumber is a library mainly deals with converting strings of number to a supported primitive data type, numerically validating strings or chars, numerically comparing strings, and converting a supported primitive data type to numerical strings.
Currently, host.fai.lib.faiNumber supports converting numerical strings of radix 2, 3, 8, 10, 16 to long and int integer. This library supports comparing strings of any length(bound by memory limitation) of integer values of any radix between 2 to 36 without needing to convert them to a primitive data type.
host.fai.lib.faiNumber's goal is to work with each number radix individually so that the conversion can be performed in the most optimized manner so that maximum speed and efficiency can be achieved. Another goal of this library is to be able to provide support for all numbering systems between 2 and 36. Future support for float, double, short, and byte is also another goal of this library.
Although, this library aimed for speed, not all methods provided by this library did achieve maximum optimization. This library is very fast and should be among the fastest for parsing numerical strings of a supported base radix to integer long or integer int data type. For parsing a numerical string to an int or a long integer, this library is faster than the built-in library as of JDK 11.
This library numerical strings comparison should also be among the fastest as this library utilizes a lazy but fast algorithm to compare strings of numerical value. However, when it comes to converting a value of integer long or integer int to strings, this library is not as fast as the built-in library. Thus, it is recommended to use the built-in library Integer.toString() or Long.toString() method for converting a primitive type back to string unless a method designed specifically by this library is needed.
This library does not have any dependency and will maintain that way as that is also one of this library goal.
This library does not remove any API that was released in any final build versions without a notice spanning 3 major release versions.
Before using some of the methods of this library, it is recommended to read the documentation for what they do before using them as some of the methods of this library were built for expert usage. The previous is especially true for any assume**** methods that provide by this library.
Check out the source code and builds of this library on Github. If you like this library and would like to contribute to making this library a better library, you are more than welcome to on Github.
-
Class Summary Class Description Base10Util TheBase10Utilclass is a final class that provides static methods for converting base 10 numbering system values in string representation to a Java's Primitive Data Type.Base16Util TheBase16Utilclass is a final class that provides static methods for converting base 16 numbering system values in string representation to a Java's Primitive Data Type.Base2Util TheBase2Utilclass is a final class that provides static methods for converting base 2 numbering system values in string representation to a Java's Primitive Data Type.Base3Util TheBase3Utilclass is a final class that provides static methods for converting base 3 numbering system values in string representation to a Java's Primitive Data Type.Base8Util TheBase8Utilclass is a final class that provides static methods for converting base 8 numbering system values in string representation to a Java's Primitive Data Type.BinaryUtil TheBinaryUtilclass is a final class that provides static methods for converting binary values in string representation as bits to a Java's Primitive Data Type.DecimalUtil TheDecimalUtilclass is a final class that provides static methods for converting decimal values in string representation as bits to a Java's Primitive Data Type.faiNumberInfo ThefaiNumberInfoclass provides the version number and the package name for this package.HexUtil TheHexUtilclass is a final class that provides static methods for converting hexadecimal values in string representation as bits to a Java's Primitive Data Type.IntUtil TheIntUtilclass is a final class that provides static methods for working with integer int values.LongUtil TheLongUtilclass is a final class that provides methods for working with integer long values.NumberConverter TheNumberConvertis a final class that provide methods for converting numbers in String format to a Java's Primitive Data Type.NumberStringUtil TheNumberStringUtilclass is a final class that provides methods for working with numbers in String format.OctalUtil TheOctalUtilclass is a final class that provides static methods for converting octal values in string representation as bits to a Java's Primitive Data Type. -
Exception Summary Exception Description EmptyStringException TheEmptyStringExceptionclass is a final class that extends the IllegalArgumentException class.NumberBeyondCapacityException TheNumberBeyondCapacityExceptionclass is a class that extends the RuntimeException class.NumberOverFlowException TheNumberOverFlowExceptionclass is a final class that extends the NumberBeyondCapacityException class, of which extends the RuntimeException class.NumberUnderFlowException TheNumberUnderFlowExceptionclass is a final class that extends the NumberBeyondCapacityException class, of which extends the RuntimeException class.