Retrieve the value of a single-valued parameter.

@param key
@param defaultValue
@param cnx
761008
public static String getParameter(DbConn cnx, String key, String defaultValue)
    {
        try
        {
            return cnx.runSelectSingle("globalprm_select_by_key", 3, String.class, key);
        }
        catch (NoResultException e)
        {
            return defaultValue;
        }
    }
521617
public String getProperty(String key, String defaultValue) {
        String value = resolver.get(key);
        return (value == null) ? defaultValue : value;
    }
744208
public String getOrDefault(String key, String defaultValue) {
        return map.getOrDefault(key, defaultValue);
    }
50469
@Override
    public <T> T getValue(String key) {
        ValueObject vo = get(key);
        if (null == vo) {
            return null;
        }
        return vo.value();
    }
48658
@Override
  public String get(String key, String defaultValue)
  {
    String value = _map.get(key);

    if (value != null) {
      return value;
    }
    else {
      return defaultValue;
    }
  }
168541
public String getProperty(String key, String defaultValue) {
        String val = properties.get(key);

        if (val == null) {
            val = defaultValue;
        }

        return val;
    }
966835
public String getProperty(String key,String defaultValue)
    {
        //get property value
        return this.PROPERTIES.getProperty(key,defaultValue);
    }
1163869
private String getValueOrDefault(HttpServletRequest req, String paramName, String defaultValue) {
		final String value = req.getParameter(paramName);
		return StringUtils.isEmpty(value) ? defaultValue : value;
	}
10305
public V get(Object key) {
	checkKey(key);
	
	String cs = (String)key;
	Node<V> n = lookup(cs);
	return (n == null) ? null : n.value;
    }
298325
public boolean getBoolean(String key, boolean defaultValue) {
    	String value = get(key);
    	if(value == null) return defaultValue;
   		return XType.getBoolean(value);
    }
892634
public String getProperty(String key,String defaultValue)
    {
        String value=null;
        try
        {
            value=this.JOB.getProperty(key);
        }
        catch(Exception exception)
        {
            throw new FaxException("Error while extracting job property.",exception);
        }
        
        if(value==null)
        {
            value=defaultValue;
        }
        
        return value;
    }
990869
public java.lang.String getExternalValuesOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetExternalValues().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
1276617
public alluxio.grpc.InconsistentPropertyValues getValuesOrDefault(
      java.lang.String key,
      alluxio.grpc.InconsistentPropertyValues defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, alluxio.grpc.InconsistentPropertyValues> map =
        internalGetValues().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
573770
@Override
    public final String optString(final String key, final String defaultValue) {
        String result = optString(key);
        return result == null ? defaultValue : result;
    }
995419
protected <S> S getProperty(IClientConfigKey<S> key, @Nullable IClientConfig requestConfig, S defaultValue) {
        if (requestConfig != null && requestConfig.get(key) != null) {
            return requestConfig.get(key);
        } else {
            return clientConfig.get(key, defaultValue);
        }
    }
1258145
public int getInteger(String key, int defaultValue) {
        int result = defaultValue;
        try {
            if (key != null)
                result = getInteger(key);
        } catch (MissingResourceException e) {
        }
        return result;
    }
530763
private String p(final String key, final String defaultValue) {
		return props.getProperty(key, defaultValue);
	}