Here you can find the source of toInt(Object obj)
public static int toInt(Object obj)
//package com.java2s; /*L/* ww w. j a v a 2s .com*/ * Copyright Washington University in St. Louis, SemanticBits, Persistent Systems, Krishagni. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/wustl-common-package/LICENSE.txt for details. */ public class Main { public static int toInt(Object obj) { int value = 0; if (obj == null) return value; else { Integer intObj = (Integer) obj; value = intObj.intValue(); return value; } } }