Java ConcurrentHashMap getMapSafe( ConcurrentHashMap> map, String key)

Here you can find the source of getMapSafe( ConcurrentHashMap> map, String key)

Description

get Map Safe

License

Open Source License

Declaration

static ConcurrentHashMap<String, Double> getMapSafe(
            ConcurrentHashMap<String, ConcurrentHashMap<String, Double>> map, String key) 

Method Source Code

//package com.java2s;

import java.util.concurrent.ConcurrentHashMap;

public class Main {
    static ConcurrentHashMap<String, Double> getMapSafe(
            ConcurrentHashMap<String, ConcurrentHashMap<String, Double>> map, String key) {
        ConcurrentHashMap<String, Double> map2 = map.get(key);
        if (map2 == null) {
            map2 = new ConcurrentHashMap<String, Double>();
            map.put(key, map2);//from  w ww  . j  a  v  a2  s .  c  o m
        }
        return map2;
    }
}

Related

  1. createConcurrentHashMap()
  2. createConcurrentHashMap()
  3. getConcurrentHashMap()
  4. getDoubleSafe(ConcurrentHashMap map, String key)
  5. max(ConcurrentHashMap map)
  6. ParseKeyValString(String keyValString, ConcurrentHashMap map)
  7. parseMap(String config, ConcurrentHashMap map)
  8. putIfAbsent(ConcurrentHashMap col, K key, V val)