code: public double toDouble(double defaultValue) {
  		try {
  			return Double.parseDouble(sb.toString());
  		} catch (java.lang.NumberFormatException e) {
  		}
  		return defaultValue;
  	}
docs: returns double value ,when format error occurred ,returns default value
  
  @param defaultValue
  @return