Here you can find the source of toFloat(Object _inStrObj)
public static float toFloat(Object _inStrObj)
//package com.java2s; public class Main { public static float toFloat(Object _inStrObj) { if (_inStrObj == null || _inStrObj.toString().trim().equals("")) { return 0; } else {/*from ww w. j a v a 2 s . c o m*/ return Float.valueOf(_inStrObj.toString()).floatValue(); } } }