Here you can find the source of isNumberString(String input)
public static boolean isNumberString(String input)
//package com.java2s; public class Main { public static boolean isNumberString(String input) { if (!isNullOrEmpty(input)) { if (input.matches("[0-9]+")) { return true; }/* w ww . ja v a 2s . c o m*/ } return false; } public static boolean isNullOrEmpty(String input) { if (null == input || "".equals(input)) { return true; } return false; } }