Here you can find the source of getValue(String key, Map
public static BigDecimal getValue(String key, Map<String, BigDecimal> valuesMap)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; import java.util.Map; public class Main { public static BigDecimal getValue(String key, Map<String, BigDecimal> valuesMap) { BigDecimal value = BigDecimal.ZERO; if (valuesMap.containsKey(key)) { value = valuesMap.get(key);/*from w ww . j a v a 2 s. c o m*/ } return value; } }