Convert this string to a Double.
@param strString string to convert.
@return Double value.
@throws Exception NumberFormatException.
333249
public static Double stringToDouble(String strString, int ibScale) throws Exception
    {
        Number objData;
        initGlobals();      // Make sure you have the utilities
        if ((strString == null) || (strString.equals(Constant.BLANK)))
            return null;
        strString = DataConverters.stripNonNumber(strString);
        try   {
            synchronized (gNumberFormat)
            {
                objData = gNumberFormat.parse(strString);
            }
            if (!(objData instanceof Double))
            {
                if (objData instanceof Number)
                    objData = new Double(objData.doubleValue());
                else
                    objData = null;
            }
        } catch (ParseException ex)   {
            objData = null;
        }
        if (objData == null)
        {
            try   {
                objData = new Double(strString);
            } catch (NumberFormatException ex)  {
                throw ex;
            }
        }
        if (ibScale != -1)
            objData = new Double(Math.floor(((Double)objData).doubleValue() * Math.pow(10, ibScale) + 0.5) / Math.pow(10, ibScale));
        return (Double)objData;
    }
985044
public Number getNumber(String key) throws NumberFormatException {
        String value = getString(key);
        if (value == null) {
            return null;
        }
        else {
            try {
                return Integer.valueOf(value);
            }
            catch (NumberFormatException e) {
            }
            try {
                return Long.valueOf(value);
            }
            catch (NumberFormatException e) {
            }
            return Double.valueOf(value);
        }
    }
1344200
protected double doubleValue(final char op, final String s) {
        final double result = Double.parseDouble(s);
        if (op == '-') {
            return -1 * result;
        }
        return result;
    }
706569
@Override
	public double getDouble(String fldName) throws RemoteException {
		try {
			fldName = fldName.toLowerCase(); // to ensure case-insensitivity
			return (Double) s.getVal(fldName).castTo(DOUBLE).asJavaVal();
		} catch (RuntimeException e) {
			rconn.rollback();
			throw e;
		}
	}
1232249
private static double doubleValue(Object attributeValue)
         throws NumberFormatException {

        if (attributeValue instanceof Number) {
            return (((Number) attributeValue).doubleValue());
        } else {
            return (Double.parseDouble(attributeValue.toString()));
        }

    }
1285933
public static int string2int(String s, int radix)
        throws NumberFormatException {
        if (radix == 10) {
            return Integer.parseInt(s, radix);
        } else {
            char[] cs = s.toCharArray();
            int limit = Integer.MAX_VALUE / (radix/2);
            int n = 0;
            for (int i = 0; i < cs.length; i++) {
                int d = Character.digit(cs[i], radix);
                if (n < 0 ||
                    n > limit ||
                    n * radix > Integer.MAX_VALUE - d)
                    throw new NumberFormatException();
                n = n * radix + d;
            }
            return n;
        }
    }
979648
public static double parseNumber(String number, Locale locale) throws ParseException {
    if ("".equals(number)) {
      return Double.NaN;
    }
    return NumberFormat.getNumberInstance(locale).parse(number).doubleValue();
  }
158828
public static byte[] doubleFormating(Number num, Charset charset, int fieldLength, int sizeDecimalPart) {
		int sizeWholePart = fieldLength - (sizeDecimalPart > 0 ? (sizeDecimalPart + 1) : 0);

		StringBuilder format = new StringBuilder(fieldLength);
		for (int i = 0; i < sizeWholePart-1; i++) {
			format.append("#");
		}
		if (format.length() < sizeWholePart) {
			format.append("0");
		}
		if (sizeDecimalPart > 0) {
			format.append(".");
			for (int i = 0; i < sizeDecimalPart; i++) {
				format.append("0");
			}
		}

		DecimalFormat df = (DecimalFormat) NumberFormat.getInstance(Locale.ENGLISH);
		df.applyPattern(format.toString());
		return textPadding(df.format(num).toString(), charset, fieldLength, DBFAlignment.RIGHT,
				(byte) ' ');
	}
245726
public static double getDouble(
    Object      value)
  {
    if (value == null)
    {
        return 0;
    }

    return Double.valueOf(value.toString()).doubleValue();

  }
1191958
public Double getDouble(String attr) {
		Number n = (Number)attrs.get(attr);
		return n != null ? n.doubleValue() : null;
	}
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);
            }
        }
    }
1246716
public static String formatDouble(final Double amount, String pattern) {
		if (pattern == null || pattern.equals("")) {
			pattern = JKFormatUtil.DEFAULT_DOUBLE_FORMAT;
		}
		return JKFormatUtil.getNumberFormatter(pattern).format(amount);
	}
1122492
public static BigDecimal parseString(String numberStr, String pattern) throws ParseException {
		DecimalFormat df = null;
		if (StringUtils.isEmpty(pattern)) {
			df = PRETTY_FORMAT.get();
		} else {
			df = (DecimalFormat) DecimalFormat.getInstance();
			df.applyPattern(pattern);
		}

		return new BigDecimal(df.parse(numberStr).doubleValue());
	}
167770
@Override
    public double getDoubleValue( final String       key,
                                  final double       defaultValue )
    {
        return formatDoubleValue( key, getFormattedPropValue( key ), defaultValue );
    }
1159946
public Double convertStringToDouble(String value) {
        Double result;
        try {
            result = Double.valueOf(value);
        } catch (NumberFormatException e) {
            result = DEFAULT_DOUBLE_VALUE;
        }
        return result;
    }
1349411
@Override
    public Double getDouble( final String     key,
                             final Double     defaultValue )
    {
        return formatDouble( key, getFormattedPropValue( key ), defaultValue );
    }
873178
public static final Function<BigDecimal,String> toStr() {
	    return (Function<BigDecimal,String>)((Function)FnNumber.toStr());
    }