return a map matching key from given map

@param parent
@param key key of the map
@return matching map, if no map exist it willbe one created
501019
private Map<String, Scope> getSubMap(Map<String, Map<String, Scope>> parent, String key) {

	Map<String, Scope> context = parent.get(key);
	if (context != null) return context;

	context = MapFactory.<String, Scope>getConcurrentMap();
	parent.put(key, context);
	return context;

    }
484706
public static <K, E, V extends Set<E>> Set<E> getOrEmptySet(final Map<K, V> map, final Object key) {
        if (N.isNullOrEmpty(map)) {
            return N.<E> emptySet();
        }

        final V val = map.get(key);

        if (val != null || map.containsKey(key)) {
            return val;
        } else {
            return N.emptySet();
        }
    }
94360
@Override
    public boolean containsKey(Object key) {
        if (key == null) {
            return false;
        }
        Map<String, GroovyRunner> map = getMap();
        readLock.lock();
        try {
            return map.containsKey(key);
        } finally {
            readLock.unlock();
        }
    }
6705
public V get(K key) {
    Entry<V> entry = classMap.get(key);
    return entry == null ? null : entry.get();
  }
38254
static public <K,V> Map<K,V> map(Map<?,?> map)
	{
		return (Map<K,V>)map;
	}
660067
@Override
    public V get(Object key) {
        // Keys can not be null
        if (key == null) {
            throw new NullPointerException("Key can not be null");
        }
        if (!(key instanceof String)) {
            throw new ClassCastException("Only String keys are supported -- got " + key.getClass());
        }
        // Empty keys are stored in the root
        if (key.equals("")) {
            if (root.getRight() == null) {
                return null;
            } else {
                return root.getRight().getValue();
            }
        }

        // Find nearest node
        PatriciaNode<V> nearest = findNearestNode((String) key);

        // If the nearest node matches key, we have a match
        if (key.equals(nearest.getKey())) {
            return nearest.getValue();
        } else {
            return null;
        }
    }
900370
public static <T, K> ArrayList<T> buildTree(Collection<T> list,
			Function<T, K> keyMapper, Function<T, K> parentKeyMapper,
			Function<T, Collection<T>> childMapper) {
		HashMap<K, T> map = toHashMap(list, keyMapper);

		ArrayList<T> root = new ArrayList<T>();
		for (T t : list) {
			K key = keyMapper.apply(t);
			K parentKey = parentKeyMapper.apply(t);
			if (parentKey == null || key.equals(parentKey))
				root.add(t);
			else
				childMapper.apply(map.get(parentKey)).add(t);
		}

		return root;
	}
1302275
public String get(final String key) {
        final Collection<Argument> args = map.get(key);
        if (args != null) {
            return args.iterator().hasNext() ? args.iterator().next().getValue() : null;
        }
        return null;
    }
1204584
public Map<String,Object> getMap(String name){
        if(variables.containsKey(name))
            return variables;
        else if(parent!=null)
            return parent.getMap(name);
        return null;
    }
932410
public static NodeImpl makeIterableAndSetMapKey(final NodeImpl node, final Object key) {
    return new NodeImpl( //
        node.name, //
        node.parent, //
        true, //
        null, //
        key, //
        node.kind, //
        node.parameterTypes, //
        node.parameterIndex, //
        node.value, //
        node.containerClass, //
        node.typeArgumentIndex //
    );
  }
61967
public Object get(Object key) {
        Object value = mCacheMap.get(key);
        if (value != null || mCacheMap.containsKey(key)) {
            return value;
        }
        value = mBackingMap.get(key);
        if (value != null || mBackingMap.containsKey(key)) {
            mCacheMap.put(key, value);
        }
        return value;
    }
630101
@SuppressWarnings("unchecked")
    public <T> T get(EventLocal<T> key) {
        EventLocalMap<EventLocal<?>, Object> map = getMap(key);
        if (null == map) {
            return key.initialValue();
        }
        return (T) map.get(key);
    }
1141124
public Object opt(String key) {
        return key == null ? null : m_map.get(key);
    }
1203030
@Override
	public boolean containsKey(final Object key) {
		return propsMap.containsKey(key) ? true : defaults != null && defaults.containsKey(key);
	}
107416
public static Key createKey(Key parent, Class<?> clazz, String name) {
		return KeyFactory.createKey(parent, getKind(clazz), name);
	}
1083180
@Override
    public boolean containsKey(Object key) {
        if (fast) {
            return (map.containsKey(key));
        } else {
            synchronized (map) {
                return (map.containsKey(key));
            }
        }
    }
1017416
final TreeMapEntry<K,V> getHigherEntry(K key) {
        TreeMapEntry<K,V> p = root;
        while (p != null) {
            int cmp = compare(key, p.key);
            if (cmp < 0) {
                if (p.left != null)
                    p = p.left;
                else
                    return p;
            } else {
                if (p.right != null) {
                    p = p.right;
                } else {
                    TreeMapEntry<K,V> parent = p.parent;
                    TreeMapEntry<K,V> ch = p;
                    while (parent != null && ch == parent.right) {
                        ch = parent;
                        parent = parent.parent;
                    }
                    return parent;
                }
            }
        }
        return null;
    }