Java BigDecimal to toInteger(BigDecimal b)

Here you can find the source of toInteger(BigDecimal b)

Description

to Integer

License

Apache License

Declaration

public static Long toInteger(BigDecimal b) 

Method Source Code


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

import java.math.BigDecimal;

public class Main {
    public static Long toInteger(BigDecimal b) {
        return b == null ? null : b.longValue();
    }//from  ww w . j a v a 2  s.com
}

Related

  1. toBeforeDecimalPointString(BigDecimal bigDecimal)
  2. toDouble(BigDecimal b, boolean allownull)
  3. toDouble(BigDecimal bigDecimal)
  4. toDouble(final BigDecimal b)
  5. toDouble(final BigDecimal b)
  6. toLong(BigDecimal value)
  7. toLongObject(@Nullable final BigDecimal value)
  8. toNumber(final BigDecimal bigDecimal, final Class clazz)
  9. toObject(BigDecimal value)