Here you can find the source of toFloat(Object v)
private static Float toFloat(Object v)
//package com.java2s; //License from project: Apache License public class Main { private static Float toFloat(Object v) { if (null == v) return null; if (v instanceof Number) return ((Number) v).floatValue(); return Float.parseFloat(v.toString()); }//ww w . ja v a 2s .c o m }