class StringUtils {

  public static boolean isEmpty(final CharSequence str) {
    if (null == str) {
      return true;
    }

    for (int i = 0, n = str.length(); i < n; ++i) {
      if (Character.isWhitespace(str.charAt(i))) {
        continue;
      }
      return false;
    }
    return true;
  }

}