Returns the parameter value for the given name or the given default if not found.

@param name the name of the parameter
@param def the default value

@return the value of the argument by name or the default value.
495676
public String getOrElse(String name, String def)
    {
        String val = get(name);
        if (val == null)
        {
            return def;
        }
        return val;
    }
133505
public List<V> getValues(String name) {
        List<V> vals = super.get(name);
        if ((vals == null) || vals.isEmpty()) {
            return null;
        }
        return vals;
    }
42136
public String getParameterValue(String name) throws RepositoryConfigurationException
   {
      String value = getParameterValue(name, null);
      if (value == null)
         throw new RepositoryConfigurationException("Parameter " + name + " not found ");
      return value;
   }
460312
public String getOutputProperty(String name) {
        String val = getOutputPropertyNonDefault(name);
        // If no explicit value, try to get the default value
        if (val == null)
            val = getOutputPropertyDefault(name);
        return val;
        
    }
573085
public ParameterValue getPathParameter(String name) {
        if (!getPathParameters().containsKey(name)) {
            return buildParameterValue();
        }

        return getPathParameters().get(name);
    }
160411
public static String getParameter (HttpServletRequest req, String name, String defval)
    {
        String value = req.getParameter(name);
        return StringUtil.isBlank(value) ? defval : value.trim();
    }
470175
public Integer getInt(String name, Integer def) {
        final String s = getProperty(name);
        try {
            return Integer.parseInt(s);
        } catch (Exception e) {
            return def;
        }
    }
30219
private Parameter getParameterByName(String name)
    {
        if (getParameters() != null)
        {
            for (Parameter p : parameters)
            {
                if (name.equals(p.getName()))
                {
                    return p;
                }
            }
        }

        return null;
    }
672565
public Boolean getParameterBoolean(String name, Boolean defaultValue)
   {
      String value = getParameterValue(name, null);

      if (value != null)
      {
         return new Boolean(value);
      }
      return defaultValue;
   }
541804
@SuppressWarnings("unchecked")
  public <C extends PrimitiveConfig<C>> C getPrimitiveDefault(String name) {
    return (C) primitiveDefaults.get(name);
  }
1360506
public function getParam($name, $default = null)
    {
        if (\is_array($this->params)) {
            // Check in params that are arrays or implement array access
            return $this->params[$name] ?? $default;
        } elseif (\is_object($this->params)) {
            // Check in normal objects
            return $this->params->{$name} ?? $default;
        } else {
            // Wrong type, return default value
            return $default;
        }
    }
601040
@Override
    public String getInitParameter(String name) {
        String value = this.parametersMap.get(name);
        return value;
    }
457856
public static int getInt(String name, int defaultVal){
        if(getConfiguration().containsKey(name)){
            return getConfiguration().getInt(name);
        } else {
            return defaultVal;
        }
    }
43646
public static String getSysProperty(String name, String def) {
    return System.getProperty(H2O.OptArgs.SYSTEM_PROP_PREFIX + name, def);
  }
133915
public boolean getBool(String name, boolean def) {
        final String s = getProperty(name);
        if (s == null) {
            return def;
        }
        try {
            return s != null && s.equalsIgnoreCase("true");
        } catch (Exception e) {
            return def;
        }
    }
796747
public ParameterBinding getBindingFor(String name) {

        Assert.hasText(name, PARAMETER_NAME_MISSING);

        for (ParameterBinding binding : bindings) {
            if (binding.hasName(name)) {
                return binding;
            }
        }

        throw new IllegalArgumentException(String.format("No parameter binding found for name %s!", name));
    }
1303550
@SuppressWarnings("unchecked")
    public <T> T getOptionValue(String name)
    {
        return (T) configurationOptions.get(name);
    }