code: public static Integer toInteger(Object o, Integer defaultValue) {
  	if (defaultValue != null) return Integer.valueOf(toIntValue(o, defaultValue.intValue()));
  	int res = toIntValue(o, Integer.MIN_VALUE);
  	if (res == Integer.MIN_VALUE) return defaultValue;
  	return Integer.valueOf(res);
      }
docs: casts a Object to a Integer
  
  @param o Object to cast to Integer
  @param defaultValue
  @return Integer from Object