Here you can find the source of lengthBetween(String param, int minLength, int maxLength)
public static boolean lengthBetween(String param, int minLength, int maxLength)
//package com.java2s; public class Main { public static boolean lengthBetween(String param, int minLength, int maxLength) { boolean flag = false; if (notNOE(param)) { if (param.length() >= minLength && param.length() <= maxLength) { flag = true;/*from www . j a v a2 s . co m*/ } } return flag; } public static boolean notNOE(String param) { return !isNullOrEmpty(param); } public static boolean isNullOrEmpty(String param) { if (null == param || param.isEmpty()) return true; return false; } }