Here you can find the source of isTelNumAvailable(String telNum)
public static boolean isTelNumAvailable(String telNum)
//package com.java2s; public class Main { public static boolean isTelNumAvailable(String telNum) { boolean result = false; if (!isNullOrEmpty(telNum) && telNum.matches("^1[3458]{1}[0-9]{9}$")) { result = true;/*from ww w . ja v a 2 s . com*/ } return result; } public static boolean isNullOrEmpty(String input) { if (null == input || "".equals(input)) { return true; } return false; } }