private static boolean verifyStringParam(String str,int maxLength,String acceptableCharacters){
  return !(str == null || str.length() == 0 || str.length() > maxLength || !Pattern.matches(acceptableCharacters,str));
}

private static boolean verifyStringParam ( String str , int maxLength , String acceptableCharacters ) { return ! ( str == null || str . length ( ) == 0 || str . length ( ) > maxLength || ! Pattern . matches ( acceptableCharacters , str ) ) ; }
returns true if the specified string is non - null , greater then 0 in length , less than the specified length and matches the regex provided .
