Read double.

@param value the value
@param defaultValue the default value
@return the double
180012
public static Double readDouble(String value, Double defaultValue) {
		if (!StringUtils.hasText(value)) return defaultValue;
		
		return Double.valueOf(value);
	}
1098735
public Double getColumnValueAsDouble(final int col, final double defaultValue) {
		Double value = getColumnValueAsDouble(col);
		if (value == null) {
			value = defaultValue;
		}
		return value;
	}
1083513
public float readFloat(float defaultValue, String attribute)
    {
        return Float.parseFloat(getValue(String.valueOf(defaultValue), attribute));
    }
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;
		}
	}
731943
public double toDouble(double defaultValue) {
		try {
			return Double.parseDouble(sb.toString());
		} catch (java.lang.NumberFormatException e) {
		}
		return defaultValue;
	}
1051747
public static Float toFloat(Object value, Float defaultValue) {
		return convert(Float.class, value, defaultValue);
	}
181590
public DoubleParameter setDefaultValue(double defaultValue) {
		super.setDefaultValue(defaultValue);

		if (hasMinimumValue) {
			if (minimumValueInclusive) {
				Util.checkParameter(defaultValue >= minimumValue,
					"Default value (" + defaultValue + ") must be greater than or equal to minimum (" + minimumValue + ")");
			} else {
				Util.checkParameter(defaultValue > minimumValue,
					"Default value (" + defaultValue + ") must be greater than minimum (" + minimumValue + ")");
			}
		}

		if (hasMaximumValue) {
			if (maximumValueInclusive) {
				Util.checkParameter(defaultValue <= maximumValue,
					"Default value (" + defaultValue + ") must be less than or equal to maximum (" + maximumValue + ")");
			} else {
				Util.checkParameter(defaultValue < maximumValue,
					"Default value (" + defaultValue + ") must be less than maximum (" + maximumValue + ")");
			}
		}

		return this;
	}
1151980
public Double getValueDouble(String label) {
        PrimitiveObject o = getPrimitiveObject(VALUE, label, ObjectUtil.DOUBLE, "Double");
        if (o == null) {
            return null;
        }
        return (Double) o.getObject();
    }
906618
public Double getDouble(String name) {
        //let it fail in the more general case where it isn't actually a number
        Number number = (Number) content.get(name);
        if (number == null) {
            return null;
        } else if (number instanceof Double) {
            return (Double) number;
        } else {
            return number.doubleValue(); //autoboxing to Double
        }
    }
391944
public static Double toDouble(Object value) {
        if (value == null) {
            return null;
        } else if (value instanceof Double) {
            return (Double) value;
        } else if (value instanceof Number) {
            return ((Number) value).doubleValue();
        } else {
            try {
                return Double.valueOf(value.toString().trim());
            } catch (NumberFormatException e) {
                throw new ConversionException("failed to convert: '" + value + "' to Double", e);
            }
        }
    }
273894
public static Long getValue(final Long value, final Long defaultValue) {

    return value == null ? defaultValue : value;
  }
1212954
public static double toDouble(Object value, double defaultValue) {
		if (value == null || value.toString().trim().equals("")) {
			return defaultValue;
		}
		if (value instanceof Double) {
			return (double) value;
		}
		if (value instanceof Date) {
			final Date date = (Date) value;
			return date.getTime();
		}
		return Double.parseDouble(value.toString());
	}
366033
public Double getDouble(String key, Double defaultValue) throws SyntaxException
    {
        String value = getSimple(key);
        if (value == null)
        {
            return defaultValue;
        }
        else
        {
            try
            {
                return Double.valueOf(value);
            }
            catch (NumberFormatException e)
            {
                throw new SyntaxException(String.format("Invalid double value %s for '%s'", value, key));
            }
        }
    }
1349411
@Override
    public Double getDouble( final String     key,
                             final Double     defaultValue )
    {
        return formatDouble( key, getFormattedPropValue( key ), defaultValue );
    }
386663
static double readDouble(Node node)
    {
        if (node == null)
        {
            throw new XmlException(
                "Tried to read double value from null node");
        }
        String value = node.getFirstChild().getNodeValue();
        if (value == null)
        {
            throw new XmlException(
                "Tried to read double value from null value");
        }
        try
        {
            return Double.parseDouble(value);
        }
        catch (NumberFormatException e)
        {
            throw new XmlException(
                "Expected double value, found \""+value+"\"", e);
        }
    }
1072490
public JBBPTextWriter Double(final double value) throws IOException {
    ensureValueMode();
    String convertedByExtras = null;
    for (final Extra e : this.extras) {
      convertedByExtras = e.doConvertDoubleToStr(this, value);
      if (convertedByExtras != null) {
        break;
      }
    }

    if (convertedByExtras == null) {
      final double valueToWrite;
      if (this.byteOrder == JBBPByteOrder.LITTLE_ENDIAN) {
        valueToWrite = Double.longBitsToDouble(JBBPFieldLong.reverseBits(Double.doubleToLongBits(value)));
      } else {
        valueToWrite = value;
      }
      printValueString(JBBPUtils.ensureMinTextLength(JBBPUtils.double2str(valueToWrite, this.radix), this.maxCharsRadixForShort, '0', 0));
    } else {
      printValueString(convertedByExtras);
    }
    return this;
  }
697295
public T convertQuietly(Object value, T defaultValue) {
		try {
			return convert(value, defaultValue);
		} catch (Exception e) {
			return defaultValue;
		}
	}