Here you can find the source of toIntString(Object object)
public static String toIntString(Object object)
//package com.java2s; //License from project: Open Source License public class Main { public static String toIntString(Object object) { if (object == null) { return null; } else if (object instanceof Number) { return String.valueOf(((Number) object).intValue()); } else {//from ww w . j a va 2 s. c om return object.toString(); } } }