List of utility methods to do Float Number Create
float | toFloat(String str) to Float return toFloat(str, 0.0f);
|
float | toFloat(String str, float defaultValue) Convert a if (str == null) { return defaultValue; try { return Float.parseFloat(str); } catch (NumberFormatException nfe) { return defaultValue; |
float | toFloat(String str, float defaultValue) Convert the string to int. float value = defaultValue; try { value = Float.parseFloat(str); } catch (NumberFormatException e) { value = defaultValue; return value; |
float | toFloat(String string) to Float if (isEmpty(string)) { return 0.0f; try { return Float.parseFloat(string); } catch (NumberFormatException ex) { return 0.0f; |
Float | toFloat(String text) Converts a string of text to a float value. try { return Float.parseFloat(text); } catch (NumberFormatException e) { return null; |
Float | toFloat(String text) Converts a string to a Float. if (text == null) { return null; return new Float(text); |
Float | toFloat(String value) to Float if (null == value) { return null; value = value.trim(); if ("null".equals(value)) { return null; return Float.parseFloat(value); ... |
float | toFloat(String value) Gets the float value of the input string value. try { value = value.replaceAll("[\\s+ \\$]", ""); if (value != null) { return Float.parseFloat(value); } catch (Exception ex) { return 0; ... |
float | toFloat(String value, float _default) to Float if (value == null || value.length() == 0) return _default; return Float.valueOf(value); |
Float | toFloat(String value, Float defaultValue) to Float if (isEmpty(value)) return defaultValue; try { return Float.parseFloat(value); } catch (Exception e) { return defaultValue; |