public static boolean isEmpty(final String test) {
    boolean result;
    if (test == null) {
      result = true;
    } else {
      result = test.trim().length() == 0;
    }
    return result;
  }
public static boolean isEmpty(final String test) {
    boolean result;
    if (test == null) {
      result = true;
    } else {
      result = test.trim().length() == 0;
    }
    return result;
  }
public static boolean isEmpty ( final String test ) { boolean result ; if ( test == null ) { result = true ; } else { result = test . trim ( ) . length ( ) == 0 ; } return result ; }
Returns true if the argument is null or consists of whitespaces only.
<p>

@param test
the <code>String</code> to test.

@return true if the argument is null or consists of whitespaces only.
Returns true if the argument is null or consists of whitespaces only . <p >