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