public static final BigInteger getBigInteger ( Number value ) { BigInteger result = null ; if ( value != null ) { if ( value instanceof BigInteger ) { result = ( BigInteger ) value ; } else { result = BigInteger . valueOf ( Math . round ( value . doubleValue ( ) ) ) ; } } return ( result ) ; }
Utility method used to convert a Number into a BigInteger .