Java Number Add add(long val, long augend)

Here you can find the source of add(long val, long augend)

Description

add

License

Open Source License

Declaration

public static BigDecimal add(long val, long augend) 

Method Source Code


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

import java.math.BigDecimal;

public class Main {
    public static BigDecimal add(long val, long augend) {
        return add(bd(val), augend);
    }//from   www .j a  v a 2  s  .  c  om

    public static BigDecimal add(BigDecimal val, long augend) {
        return add(val, bd(augend));
    }

    public static BigDecimal add(BigDecimal val, BigDecimal augend) {
        return val.add(augend);
    }

    public static BigDecimal bd(long val) {
        return BigDecimal.valueOf(val);
    }

    public static BigDecimal bd(double val) {
        return BigDecimal.valueOf(val);
    }
}

Related

  1. add(final Number a, final Number b)
  2. add(final String start, final String... values)
  3. add(float... values)
  4. add(float[] param)
  5. add(long v1, long v2)
  6. add(Number a, Number b)
  7. add(Object addend, Object augend)
  8. add(Object num1, Object num2)
  9. add(String number1, String number2)