Here you can find the source of asFloat(String v)
public static Float asFloat(String v)
//package com.java2s; //License from project: Apache License public class Main { public static Float asFloat(String v) { try {//from www. j av a2 s .c om return (v != null) ? Float.valueOf(v) : null; } catch (NumberFormatException ex) { return null; } } }