Java Utililty Methods Float Number Create

List of utility methods to do Float Number Create

Description

The list of methods to do Float Number Create are organized into topic(s).

Method

floattoFloat(Object obj)
to Float
return Float.parseFloat(toString(obj).trim());
FloattoFloat(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);
...
floattoFloat(Object rawColor)
to Float
return rawColor instanceof Integer ? (float) (Integer) rawColor : (float) (double) rawColor;
FloattoFloat(Object v)
to Float
if (null == v)
    return null;
if (v instanceof Number)
    return ((Number) v).floatValue();
return Float.parseFloat(v.toString());
FloattoFloat(Object val)
to Float
return toDouble(val).floatValue();
floattoFloat(Object val)
to Float
return (float) toDouble(val);
floattoFloat(Object value)
to Float
return (value == null || "null".equals(value.toString())) ? 0 : Float.parseFloat(value.toString().trim());
FloattoFloat(Object value)
To float.
return Float.valueOf(value.toString());
floattoFloat(Object value)
to Float
if (value instanceof Number)
    return ((Number) value).floatValue();
else if (value == null)
    return 0;
else
    return Float.parseFloat(value.toString());
FloattoFloat(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);
...