Java BigDecimal Parse isIntegerValue(final BigDecimal bd)

Here you can find the source of isIntegerValue(final BigDecimal bd)

Description

is Integer Value

License

Apache License

Declaration

public static boolean isIntegerValue(final BigDecimal bd) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.math.BigDecimal;

public class Main {
    public static final int scale = 24;

    public static boolean isIntegerValue(final BigDecimal bd) {
        return bd.signum() == 0 || bd.scale() <= 0 || bd.stripTrailingZeros().scale() <= 0;
    }/*from  w w w.j  av  a2  s.  c om*/
}

Related

  1. isBigDecimalAssignable(String javaDataType)
  2. isBigDecimalType(Class type)
  3. isInteger(BigDecimal decimal)
  4. isInteger(BigDecimal inValue)
  5. isIntegerBigDecimal(BigDecimal bd)
  6. parseBigDecimal(Object o, BigDecimal defaulti)
  7. parseBigDecimal(Object obj)
  8. parseBigDecimal(Object value)
  9. parseBigDecimal(Object value)