Returns the char value for the specified name. If the name does not exist
or the value for the name can not be interpreted as a char, the
defaultValue is returned.

@param name
@param defaultValue
@return name value or defaultValue
167118
public char getChar(String name, char defaultValue) {
        String value = getString(name, null);
        if (!StringUtils.isNullOrEmpty(value)) {
            return value.trim().charAt(0);
        }

        return defaultValue;
    }
1129800
@Override
    public <T> T get(String name, T defaultValue) {
        if (!containsKey(name)) {
            return defaultValue;
        }
        return get(name);
    }
653633
public <R> R get(@NotNull final String name, R defaultValue) {
        if (context.containsKey(name)) {
            return get(name);
        } else {
            return defaultValue;
        }
    }
442463
public static String getProperty(String propertyName, String defaultValue) {
        String value = get(propertyName);
        return value == null ? defaultValue : value;
    }
1155202
public double getDouble(String name, double defaultValue) {
        try {
            String value = getString(name, null);
            if (!StringUtils.isNullOrEmpty(value)) {
                return Double.parseDouble(value.trim());
            }
        } catch (NumberFormatException e) {
            log.warn("Failed to parse double for " + name + USING_DEFAULT_OF
                + defaultValue);
        }

        return defaultValue;
    }
1054530
public static String get(String name, String defaultValue) {
		return StrUtil.nullToDefault(get(name, false), defaultValue);
	}
244098
public long getLongHeader(String name, long defaultValue) {
        String firstHeader = getHeader(name);
        if (firstHeader == null) {
            return defaultValue;
        }
        try {
            return Long.parseLong(firstHeader.trim());
        } catch (NumberFormatException e) {
            return defaultValue;
        }
    }
76995
public long getLong(String name, long defaultValue) {
        try {
            String value = getString(name, null);
            if (!StringUtils.isNullOrEmpty(value)) {
                return Long.parseLong(value.trim());
            }
        } catch (NumberFormatException e) {
            log.warn("Failed to parse long for " + name + USING_DEFAULT_OF
                + defaultValue);
        }

        return defaultValue;
    }
1163869
private String getValueOrDefault(HttpServletRequest req, String paramName, String defaultValue) {
		final String value = req.getParameter(paramName);
		return StringUtils.isEmpty(value) ? defaultValue : value;
	}
740528
public boolean getBoolean(String name, boolean defaultValue) {
        String value = getString(name, null);
        if (!StringUtils.isNullOrEmpty(value)) {
            return Boolean.parseBoolean(value.trim());
        }

        return defaultValue;
    }
697788
public String getValue(String name) {
		String result = null;
		for (InitParam initParam : initParams) {
			if (initParam.getName().equals(name)) {
				result = initParam.getValue();
				break;
			}
		}
		return result;
	}
678887
public Long getParameterLong(String name, Long defaultValue)
   {
      String value = getParameterValue(name, null);

      if (value != null)
      {
         try
         {
            return StringNumberParser.parseLong(value);
         }
         catch (NumberFormatException e)
         {
            if (LOG.isTraceEnabled())
            {
               LOG.trace("An exception occurred: " + e.getMessage());
            }
         }
      }
      return defaultValue;
   }
1032572
public String getParameterAsString(String name, String defaultValue) {
		return defaultValue(blankToNull(getParameter(name)), defaultValue);
	}
1047927
public String getAsString(final String name, final String defaultValue) {
        return AtsdUtil.getPropertyStringValue(fullName(name), clientProperties, defaultValue);
    }
1364108
public boolean getBooleanValue(String name, boolean defaultValue) {

        String value = getValue(name);

        if (value == null) {
            return defaultValue;
        } else {
            return value.equals("true");
        }
    }
833493
public static Long getLong(String name, Long defaultValue) {
		return Long.getLong(name, defaultValue);
	}
167397
@SuppressWarnings("unchecked")
  public String getString(String name) {
    return ((Value<String>) getValue(name)).get();
  }