class StringHelper {

    public static boolean containsNonWhitespace(String s) {
        if (s == null)
            return false;

        Matcher matcher = WHITESPACE_PATTERN.matcher(s);

        // if string matches whitespace pattern then string does not
        // contain non-whitespace
        return !matcher.find();
    }

}