code: public static float parseFloat(String s, float f) {
  		if (s == null) {
  			return f;
  		}
  		try {
  			return Float.parseFloat(s.trim());
  		} catch (NumberFormatException e) {
  			return f;
  		}
  	}
docs: Parse a <b>float</b> with a given default value <b>f</b>
  
  @return default value if null or not parsable