Here you can find the source of validInt(CharSequence integer)
public static boolean validInt(CharSequence integer)
//package com.java2s; import android.text.TextUtils; public class Main { public static boolean validInt(CharSequence integer) { if (!TextUtils.isEmpty(integer)) { try { Integer.parseInt(integer.toString()); return true; } catch (NumberFormatException ex) { }//w ww . j a v a 2 s. c o m } return false; } }