Here you can find the source of toInt(Object o)
public static Integer toInt(Object o)
//package com.java2s; //License from project: Apache License public class Main { public static Integer toInt(Object o) { if (o == null) return new Integer(0); return Integer.valueOf(o.toString()); }/*from w ww. ja v a 2s. c o m*/ }