Here you can find the source of asInteger(String v)
public static Integer asInteger(String v)
//package com.java2s; //License from project: Apache License public class Main { public static Integer asInteger(String v) { try {//from w w w .j a v a2s. co m return (v != null) ? Integer.valueOf(v) : null; } catch (NumberFormatException ex) { return null; } } }