Here you can find the source of getDoubleSafe(ConcurrentHashMap
static double getDoubleSafe(ConcurrentHashMap<String, Double> map, String key)
//package com.java2s; import java.util.concurrent.ConcurrentHashMap; public class Main { static double getDoubleSafe(ConcurrentHashMap<String, Double> map, String key) { Double v = map.get(key);//from ww w . ja v a2 s .c o m if (v == null) return 0.0; else return v; } }