Extracts value from map if given value is null.
@param value current value
@param props properties to extract value from
@param key property name to extract
@return initial value or value extracted from map
425372
public static String lookupIfEmpty( final String value,
                                        final Map<String, String> props,
                                        final String key ) {
        return value != null ? value : props.get(key);
    }
282005
public Object get(Object key)
    {
        if (key==null)
            return _nullValue;
        if (key instanceof String)
            return get((String)key);
        return get(key.toString());
    }
1248951
public static <K, V> KeyValue<K, V> empty(K key) {
        return new KeyValue<K, V>(key, null);
    }
1203030
@Override
	public boolean containsKey(final Object key) {
		return propsMap.containsKey(key) ? true : defaults != null && defaults.containsKey(key);
	}
775555
public static void set(String key, String value) {
        PROPS.get().setProperty(key, value);
    }
1326042
public V get (K key)
    {
        V value = null;
        SoftReference<V> ref = _map.get(key);
        if (ref != null) {
            value = ref.get();
            if (value == null) {
                _map.remove(key);
            }
        }
        return value;
    }
1197132
@Override
  public V get(Object key) {
    // key could be not in original or in deltaMap
    // key could be not in original but in deltaMap
    // key could be in original but removed from deltaMap
    // key could be in original but mapped to something else in deltaMap
    V deltaResult = deltaMap.get(key);
    if (deltaResult == null) {
      return originalMap.get(key);
    }
    if (deltaResult == nullValue) {
      return null;
    }
    if (deltaResult == removedValue) {
      return null;
    }
    return deltaResult;
  }
1085516
public String getValueForDisplayValue(final String key) {
        if (mapDisplayValuesToValues.containsKey(key)) {
            return mapDisplayValuesToValues.get(key);
        }
        return key;
    }
438118
protected String getAndRemoveValue(Map<String, String> map, String key) {

        String value = map.get(key);
        if (value != null) {
            map.remove(key);
        }
        return value;
    }
444766
@SuppressWarnings("unchecked")
    public V get(final long key) {
        int index = longHash(key, mask);
        Object value;
        while (null != (value = values[index])) {
            if (key == keys[index]) {
                return (V) value;
            }
            index = ++index & mask;
        }
        return null;
    }
1149542
@SuppressWarnings("unchecked")
    private static Object getMappedValue(Object obj, Property property, Object key) {
        if (property == null) {
            throw new IllegalArgumentException("Cannot get the mapped value from a 'null' property.");
        }

        if (property.getType().isAssignableFrom(Map.class)) {
            Map<Object, Object> map = (Map<Object, Object>) property.get(obj);

            if (map == null) {
                throw new NullPointerException("Invalid 'null' value found for mapped " + property + " in "
                                                       + obj.getClass().getName() + ".");

            }

            return map.get(key);
        } else {
            throw new IllegalArgumentException("Cannot get a mapped value from the not mapped " + property
                                                       + ". Only Map type is supported, but " + property.getType().getSimpleName() + " found.");
        }
    }
347497
public String getKeyValue(String key){
        String keyName = keysMap.get(key);
        if (keyName != null){
            return keyName;
        }
        return ""; //key wasn't defined in keys properties file
    }
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;
    }
1027294
private void parseDelayedExtract(Map<Object, Object> props) {
        Object value = props.get(HttpConfigConstants.PROPNAME_EXTRACT_VALUE);
        if (null != value) {
            this.bExtractValue = convertBoolean(value);
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "Config: header value extraction is " + shouldExtractValue());
            }
        }
    }
834492
public static Object findMapValueByKey(Object key, Map<?, ?> map,
	Object defaultValue)
	{
		if (key == null || map == null)
			return defaultValue;

		Object value = map.get(key);

		if (value == null)
			return defaultValue;

		return value;
	}
36774
public static String getPropertyOrNull(final String key) {
        String value = System.getProperty(key);
        return (value == null || value.length() <= 0)? null: value;
    }
1214891
public String getProperty(String key)
    {
        if (properties == null)
            return null;
        String value = properties.get(key);
        if (value == null)
        {
            if (key.startsWith(PROPERTY_PREFIX))
                value = properties.get(key.substring(PROPERTY_PREFIX.length()));
            else
                value = properties.get(PROPERTY_PREFIX + key);
        }
        return value;
    }