public static List<Long> toArrayLong(String value) { if (value != null) { String[] tmp = value.trim().split("\\,"); if (tmp != null && tmp.length > 0) { ArrayList<Long> o = new ArrayList<Long>(); for (String t : tmp) { if (StringUtils.isNumeric(t.trim())) { o.add(new Long(t.trim())); } } return o; } } return null; }
public static Integer toInteger(Object value, Integer defvalue) { if (value != null && StringUtils.isNumeric(value)) { return new Integer(value.toString()); } return defvalue; }
public static Double toDouble(Object value, Double defvalue) { if (value != null && StringUtils.isNumeric(value)) { return new Double(value.toString()); } return defvalue; }
public static Integer toInteger(String value) { if (value != null && StringUtils.isNumeric(value)) { return new Integer(value); } return null; }