static String checkNotNullOrBlank(String value,String errorMessage,Object... args){
  checkNotNull(value,errorMessage,args);
  String trimmed=value.trim();
  if (trimmed.isEmpty()) {
    throw new IllegalArgumentException(String.format(errorMessage,args));
  }
  return trimmed;
}

static String checkNotNullOrBlank ( String value , String errorMessage , Object ... args ) { checkNotNull ( value , errorMessage , args ) ; String trimmed = value . trim ( ) ; if ( trimmed . isEmpty ( ) ) { throw new IllegalArgumentException ( String . format ( errorMessage , args ) ) ; } return trimmed ; }
ensures that a string is not null and contains at least one non - whitespace char .
