1 package net.jaekl.qd.util;
3 public class ParseUtils {
4 // Attempt to parse the string as a double.
5 // Treat errors as a zero value.
6 public static double parseDouble(String string) {
7 if ((null == string) || ("".equals(string))) {
11 return Double.parseDouble(string);
13 catch (NumberFormatException exc) {
18 public static int parseInt(String string) {
19 if ((null == string) || ("".equals(string))) {
23 return Integer.parseInt(string);
25 catch (NumberFormatException exc) {