Returns the value to which the specified key is mapped, or
an empty immutable {@code Set} if this map contains no mapping for the key.

@param map
@param key
@return
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();
        }
    }
925194
public Map<ElementDescriptor<?>, Object> getSet()
	{
		return mSet == null ? null : Collections.unmodifiableMap(mSet);
	}
557947
public <K, V> Set<Map.Entry<K, V>> entrySet(Map<K, V> map) {
        return map.entrySet();
    }
608394
public static <K, V> Map<K, V> copyOf(Map<K, V> map) {
        Preconditions.checkNotNull(map);
        return ImmutableMap.<K, V> builder().putAll(map).build();
    }
272973
public static String getValue(Map<String,String> map, String key, String defaultValue) {
		return map.containsKey( key ) ? map.get( key ) : defaultValue;
	}
971620
public static <K, V> Map<K, V> cast(Map<?, ?> map) {
    return map == null ? null : new CastingMap<K, V>(map);
  }
990040
private static String getValue(Map<String, String> map, String keyName) {
    String value = map.get(keyName);
    return value == null ? "-" : value;
  }
1226329
public static <K, V> ArrayList<V> valuesOfKeys(Map<K, V> map, Iterable<K> keys) {
		return valuesOfKeys(map, keys.iterator());
	}
385168
public Object value(int i, String key) {
        Object data = getData();
        if (data instanceof List) {
            List list = (List) data;
            if (list.size() > 0) {
                Map map = (Map) list.get(i);
                return map.get(key);
            }
        } else if (data instanceof Map) {
            return ((Map) data).get(key);
        }
        return null;
    }
147644
public final Set<V> getValues(K key) {
	Set<V> set = _getValues(key);
	if(set == null)
	    return Collections.emptySet();
	else 
	    return Collections.unmodifiableSet(set);
    }
1250436
private String getReqValue(Map<String, String[]> map, String key) {

        return map.get(key) != null ? map.get(key)[0] : null;
    }
222145
private static <K, V> void set(Map<K, Set<V>> map, K key, V value) {
    Set<V> values = map.get(key);
    if (values == null) {
      values = new HashSet<>();
      map.put(key, values);
    }
    values.add(value);
  }
1206306
public Value get(Object key) {
        /* If the length is under and we are asking for the key, then just look for the key. Don't build the map. */
        if (map == null && items.length < 20) {
            for (Object item : items) {
                MapItemValue miv = (MapItemValue) item;
                if (key.equals(miv.name.toValue())) {
                    return miv.value;
                }
            }
            return null;
        } else {
            if (map == null) buildIfNeededMap();
            return map.get(key);
        }
    }
438118
protected String getAndRemoveValue(Map<String, String> map, String key) {

        String value = map.get(key);
        if (value != null) {
            map.remove(key);
        }
        return value;
    }
389078
public static <K, V> ImmutableSet<K> allKeys(final Iterable<? extends Map<K, V>> maps) {
    final ImmutableSet.Builder<K> builder = ImmutableSet.builder();

    for (final Map<K, V> map : maps) {
      builder.addAll(map.keySet());
    }

    return builder.build();
  }
50048
private static <K, V> Set<K> synchronizedCopyKeys(Map<K, V> map) {

        if (map == null) {
            return new HashSet<K>();
        }
        synchronized (map) {
            return new HashSet<K>(map.keySet());
        }
    }
858789
public static Set<String> getKeysIn(final Map map, final Object... path) {
        return getMap(map, path)
            .map(m -> m
                .keySet()
                .stream()
                .map(Object::toString)
                .collect(Collectors.toSet())
            ).orElse(new HashSet<>());
    }