try { return Float.parseFloat(str); } catch (final NumberFormatException e) { return def;
return (string == null) ? null : Float.valueOf(string);
try { return (v != null) ? Float.valueOf(v) : null; } catch (NumberFormatException ex) { return null;
try { return Float.parseFloat(str); } catch (final Exception ex) { ex.printStackTrace(); return def;