Here you can find the source of textToInteger(String text)
static public Integer textToInteger(String text)
//package com.java2s; //License from project: Open Source License public class Main { static public Integer textToInteger(String text) { if (text == null || text.isEmpty()) return null; try {/*w ww .j ava 2 s . co m*/ return Integer.valueOf(text); } catch (NumberFormatException ex) { return null; } } }