Code example for BigDecimal

Methods: compareTo

0
        } 
        if (n instanceof Double)
        { 
            return n.doubleValue() == 0d;
        } 
        return toBigDecimal( n ).compareTo( DECIMAL_ZERO) == 0;
    } 
 
    /** 
     * Test, whether the given object is an integer value 
     * (Byte, Short, Integer, Long, BigInteger) 
     * @param n 
     * @return True if n is an integer. 
     */ 
    public static boolean isInteger (Number n)
    { 
        return ints.containsKey (n.getClass());
    } 
 
    /** 
     * Wrap the given primitive into the given class if the value is in the