Here you can find the source of toFloat(Object value)
public static float toFloat(Object value)
//package com.java2s; //License from project: Open Source License public class Main { public static float toFloat(Object value) { return (value == null || "null".equals(value.toString())) ? 0 : Float.parseFloat(value.toString().trim()); }//from w w w . ja va2s . c om public static String toString(Object value) { return value == null || "null".equals(value.toString()) ? "" : value.toString(); } }