Parse named parameter as Double.

@param name
parameter name
@param defaultValue
default Double value
@return Double value
177273
public Double getParameterDouble(String name, Double defaultValue)
   {
      String value = getParameterValue(name, null);

      if (value != null)
      {
         try
         {
            return StringNumberParser.parseDouble(value);
         }
         catch (NumberFormatException e)
         {
            if (LOG.isTraceEnabled())
            {
               LOG.trace("An exception occurred: " + e.getMessage());
            }
         }
      }
      return defaultValue;
   }
475800
private double getDouble( int idx, double defaultValue, CssFormatter formatter ) {
        if( parameters.size() <= idx ) {
            return defaultValue;
        }
        return parameters.get( idx ).doubleValue( formatter );
    }
50613
public static float getSystemPropertyAsFloat(String name, float defaultValue) {
        final String value = getSystemProperty(name, null);
        if (value != null) {
            try {
                return Float.parseFloat(value);
            } catch (Throwable exception) {
                //
            }
        }
        return defaultValue;
    }
881634
public Double getParameterDouble(String name) throws RepositoryConfigurationException
   {
      try
      {
         return StringNumberParser.parseDouble(getParameterValue(name));
      }
      catch (NumberFormatException e)
      {
         throw new RepositoryConfigurationException(name + ": unparseable Long. " + e, e);
      }
   }
107185
public static Double getDouble(String propertyName, Double defaultValue) {
		Double propertyValue = NumberUtil.toDoubleObject(System.getProperty(propertyName), null);
		return propertyValue != null ? propertyValue : defaultValue;
	}
1225160
public Integer getCookieToInt(String name, Integer defaultValue) {
		String result = getCookie(name);
		return result != null ? Integer.parseInt(result) : defaultValue;
	}
1341971
public static Double parse(final String s) {
        Double parsed = null;
        try {
            if (s != null) {
                parsed = Double.parseDouble(s);
            }
        } catch (final NumberFormatException e) {
        }
        return parsed;
    }
180012
public static Double readDouble(String value, Double defaultValue) {
		if (!StringUtils.hasText(value)) return defaultValue;
		
		return Double.valueOf(value);
	}
788280
public double getDouble(String name, String namespace) {
        return Double.parseDouble(get(name, namespace));
    }
98502
public int getInteger(String name, int defaultValue) {
        try {
            String value = getString(name, null);
            if (!StringUtils.isNullOrEmpty(value)) {
                return Integer.parseInt(value.trim());
            }
        } catch (NumberFormatException e) {
            log.warn("Failed to parse integer for " + name + USING_DEFAULT_OF
                + defaultValue);
        }

        return defaultValue;
    }
1122134
public static Double toDoubleObject(@Nullable String str, Double defaultValue) {
		if (StringUtils.isEmpty(str)) {
			return defaultValue;
		}
		try {
			return Double.valueOf(str);
		} catch (final NumberFormatException nfe) {
			return defaultValue;
		}
	}
386514
public static double getConfigDouble(String key, double defaultValue) {
		return NumberUtils.toDouble(getConfigParam(key, Double.toString(defaultValue)));
	}
1190844
public Double optDouble(String name, Double fallback) {
        return optDouble(name, fallback, true);
    }
753066
public int getIntReqPar(final String name,
                          final int defaultVal) throws Throwable {
    String reqpar = getReqPar(name);

    if (reqpar == null) {
      return defaultVal;
    }

    try {
      return Integer.parseInt(reqpar);
    } catch (Throwable t) {
      return defaultVal; // XXX exception?
    }
  }
1043269
protected Double addDoubleValue(Object name, double inc) {
    Double val = this.doubleCounters.get(name);
    Double retv = null;
    if (val == null) {
      retv = new Double(inc);
    } else {
      retv = new Double(val.doubleValue() + inc);
    }
    this.doubleCounters.put(name, retv);
    return retv;
  }
245257
public boolean getParameterAsBoolean(String name, Boolean defaultValue) {
		return defaultValue(stringToBoolean(getParameter(name)), defaultValue);
	}
389656
public static Double getDouble(String propertyName, String envName, Double defaultValue) {
		checkEnvName(envName);
		Double propertyValue = NumberUtil.toDoubleObject(System.getProperty(propertyName), null);
		if (propertyValue != null) {
			return propertyValue;
		} else {
			propertyValue = NumberUtil.toDoubleObject(System.getenv(envName), null);
			return propertyValue != null ? propertyValue : defaultValue;
		}
	}