Java BigDecimal getParamBigDecimal(Map paramMap, String paramName)

Here you can find the source of getParamBigDecimal(Map paramMap, String paramName)

Description

get Param Big Decimal

License

Apache License

Declaration

public static BigDecimal getParamBigDecimal(Map<String, String[]> paramMap, String paramName) 

Method Source Code

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

import java.math.BigDecimal;

import java.util.Map;

public class Main {
    public static BigDecimal getParamBigDecimal(Map<String, String[]> paramMap, String paramName) {
        String[] paramArr = paramMap.get(paramName);
        if (paramArr == null || paramArr.length == 0)
            return null;
        try {/*from   w  w  w  . j a v a2  s  .  co  m*/
            return new BigDecimal(paramArr[0]);
        } catch (Exception e) {
            return null;
        }
    }
}

Related

  1. getMaxPrecision(BigDecimal... decimals)
  2. getMean(final BigDecimal... vals)
  3. getMicroSec(BigDecimal hours)
  4. getNumberAsBigDecimal(Number value)
  5. getNumberOfDecimalPlaces(BigDecimal bigDecimal)
  6. getPercent(BigDecimal numerator, BigDecimal denominator)
  7. getPercentage(BigDecimal amount, BigDecimal percent)
  8. getPercentageValue(BigDecimal price, double amount)
  9. getProfit(BigDecimal ask, BigDecimal bid, BigDecimal fee)