Java BigDecimal to bigDecimalToLong(BigDecimal value)

Here you can find the source of bigDecimalToLong(BigDecimal value)

Description

big Decimal To Long

License

Open Source License

Declaration

public static Long bigDecimalToLong(BigDecimal value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.math.BigDecimal;

public class Main {
    public static Long bigDecimalToLong(BigDecimal value) {
        return value.setScale(0, BigDecimal.ROUND_HALF_UP).longValue();
    }//  ww  w .ja  v a  2s  .  c  o  m
}

Related

  1. bigDecimalToBytes(BigDecimal decimal)
  2. bigDecimalToDbString(BigDecimal bd)
  3. bigDecimalToInteger(BigDecimal value)
  4. bigDecimaltoJSONString(Object obj)
  5. bigDecimalToLong(BigDecimal bigDecimal)
  6. bigDecimalToStellarBalance(final BigDecimal balance)
  7. bigDecimalToString(BigDecimal bigDecimal)
  8. bigDecimalToString(BigDecimal dec)
  9. convertBigDecimalTodouble(BigDecimal bigDecimalVal)