Here you can find the source of castToFloat(final String uid)
public static Float castToFloat(final String uid)
//package com.java2s; //License from project: Open Source License public class Main { public static Float castToFloat(final String uid) { try {/*from w w w.j ava2 s. c o m*/ return Float.parseFloat(uid); } catch (NumberFormatException nfe) { return null; } } }