Java BigDecimal from longToBigDecimal(long amountAsSatoshis)

Here you can find the source of longToBigDecimal(long amountAsSatoshis)

Description

long To Big Decimal

License

Open Source License

Declaration

public static BigDecimal longToBigDecimal(long amountAsSatoshis) 

Method Source Code


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

import java.math.BigDecimal;

public class Main {
    private static final BigDecimal SATOSHIS = new BigDecimal(100000000);

    public static BigDecimal longToBigDecimal(long amountAsSatoshis) {
        return new BigDecimal(amountAsSatoshis).divide(SATOSHIS);
    }/*  w  ww  . j  a  v  a2  s  .  c  o  m*/
}

Related

  1. castToBigDecimal(Object value)
  2. convertNumberToBigDecimal(Number aNumber)
  3. doubleArrayToBigDecimalList( double[] array)
  4. doubleToBigDecimal(double amountAsDouble)
  5. doubleToBigDecimal(double dd)
  6. numberToBigDecimal(Number number)
  7. numberToBigDecimal(Number value)
  8. numberToBigDecimal(Object number)
  9. numberToBigDecimal(Object obj)