/** * Determines if a string is not empty. Its the exact opposite for * {@link #isEmpty(String)}. * * @param val * string to evaluate. * @return true if the string is not empty */ public static boolean isNotEmpty(String val) { return !isEmpty(val); }
/** * Determines if a string is not empty. Its the exact opposite for * {@link #isEmpty(String)}. * * @param val string to evaluate. * @return true if the string is not empty */ public static boolean isNotEmpty(final String val) { return !isEmpty(val); }
/** * Determines if a string is not empty. Its the exact opposite for * {@link #isEmpty(String)}. * * @param val string to evaluate. * @return true if the string is not empty */ public static boolean isNotEmpty(final String val) { return !isEmpty(val); }
/** * <pre> * StringUtil.isBlank(null) = true * StringUtil.isBlank("") = true * StringUtil.isBlank(" ") = true * StringUtil.isBlank("bob") = false * StringUtil.isBlank(" bob ") = false * </pre> */ public static boolean isBlank(String val) { return (val == null) ? true : isEmpty(val.trim()); }
/** * Checks if a String is whitespace, empty ("") or null. * * <pre> * StringUtil.isBlank(null) = true * StringUtil.isBlank("") = true * StringUtil.isBlank(" ") = true * StringUtil.isBlank("bob") = false * StringUtil.isBlank(" bob ") = false * </pre> * * @param val the String to check, may be null * * @return {@code true} if the String is null, empty or whitespace */ public static boolean isBlank(final String val) { return (val == null) ? true : isEmpty(val.trim()); }
/** * Checks if a String is whitespace, empty ("") or null. * * <pre> * StringUtil.isBlank(null) = true * StringUtil.isBlank("") = true * StringUtil.isBlank(" ") = true * StringUtil.isBlank("bob") = false * StringUtil.isBlank(" bob ") = false * </pre> * * @param val the String to check, may be null * * @return {@code true} if the String is null, empty or whitespace */ public static boolean isBlank(final String val) { return (val == null) ? true : isEmpty(val.trim()); }