Here you can find the source of objToInteger(Object obj)
public static Integer objToInteger(Object obj)
//package com.java2s; //License from project: Open Source License public class Main { public static Integer objToInteger(Object obj) { Integer result = 0;// w ww. j a va2 s. c o m try { result = Integer.valueOf(obj.toString()); } catch (Exception e) { result = null; } return result; } }