List of utility methods to do Float Number Create
float | toFloat(Object obj) to Float return Float.parseFloat(toString(obj).trim());
|
Float | toFloat(Object obj, String pattern) to Float if (obj == null) { return null; } else if (obj instanceof Float) { return (Float) obj; } else if (obj instanceof Number) { return Float.valueOf(((Number) obj).floatValue()); } else if (obj instanceof String) { return toFloat((String) obj); ... |
float | toFloat(Object rawColor) to Float return rawColor instanceof Integer ? (float) (Integer) rawColor : (float) (double) rawColor; |
Float | toFloat(Object v) to Float if (null == v) return null; if (v instanceof Number) return ((Number) v).floatValue(); return Float.parseFloat(v.toString()); |
Float | toFloat(Object val) to Float return toDouble(val).floatValue(); |
float | toFloat(Object val) to Float return (float) toDouble(val); |
float | toFloat(Object value) to Float return (value == null || "null".equals(value.toString())) ? 0 : Float.parseFloat(value.toString().trim()); |
Float | toFloat(Object value) To float. return Float.valueOf(value.toString());
|
float | toFloat(Object value) to Float if (value instanceof Number) return ((Number) value).floatValue(); else if (value == null) return 0; else return Float.parseFloat(value.toString()); |
Float | toFloat(Object value) Convert an Object to a Float. if (value == null) return null; if (value instanceof Float) return (Float) value; if (value instanceof String) { if ("".equals((String) value)) return null; return new Float((String) value); ... |