Here you can find the source of castToInteger(final String uid)
public static Integer castToInteger(final String uid)
//package com.java2s; //License from project: Open Source License public class Main { public static Integer castToInteger(final String uid) { try {/* www.j a v a 2 s.c o m*/ return Integer.decode(uid); } catch (NumberFormatException nfe) { return null; } } }