public static BigInteger toBigInteger ( Number self ) { if ( self instanceof BigInteger ) { return ( BigInteger ) self ; } else if ( self instanceof BigDecimal ) { return ( ( BigDecimal ) self ) . toBigInteger ( ) ; } else if ( self instanceof Double ) { return new BigDecimal ( ( Double ) self ) . toBigInteger ( ) ; } else if ( self instanceof Float ) { return new BigDecimal ( ( Float ) self ) . toBigInteger ( ) ; } else { return new BigInteger ( Long . toString ( self . longValue ( ) ) ) ; } }
Transform this Number into a BigInteger .