@@ -1478,10 +1478,12 @@ public static int countMatches(final CharSequence str, final CharSequence sub) {
14781478 }
14791479
14801480 /**
1481- * Returns either the passed in CharSequence, or if the CharSequence is
1482- * whitespace, empty ("") or {@code null}, the value of {@code defaultStr}.
1481+ * Returns either the passed in CharSequence, or if the CharSequence is {@link #isBlank(CharSequence) blank} (whitespaces, empty ({@code ""}) or
1482+ * {@code null}) , the value of {@code defaultStr}.
14831483 *
1484- * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
1484+ * <p>
1485+ * Whitespace is defined by {@link Character#isWhitespace(char)}.
1486+ * </p>
14851487 *
14861488 * <pre>
14871489 * StringUtils.defaultIfBlank(null, "NULL") = "NULL"
@@ -1490,12 +1492,14 @@ public static int countMatches(final CharSequence str, final CharSequence sub) {
14901492 * StringUtils.defaultIfBlank("bat", "NULL") = "bat"
14911493 * StringUtils.defaultIfBlank("", null) = null
14921494 * </pre>
1493- * @param <T> the specific kind of CharSequence
1494- * @param str the CharSequence to check, may be null
1495- * @param defaultStr the default CharSequence to return
1496- * if {@code str} is whitespace, empty ("") or {@code null}, may be null
1495+ *
1496+ * @param <T> the specific kind of CharSequence
1497+ * @param str the CharSequence to check, may be null
1498+ * @param defaultStr the default CharSequence to return if {@code str} is {@link #isBlank(CharSequence) blank} (whitespaces, empty ({@code""}) or
1499+ * {@code null}); may be null
14971500 * @return the passed in CharSequence, or the default
14981501 * @see StringUtils#defaultString(String, String)
1502+ * @see #isBlank(CharSequence)
14991503 */
15001504 public static <T extends CharSequence > T defaultIfBlank (final T str , final T defaultStr ) {
15011505 return isBlank (str ) ? defaultStr : str ;
@@ -2116,12 +2120,16 @@ public static int getFuzzyDistance(final CharSequence term, final CharSequence q
21162120 }
21172121
21182122 /**
2119- * Returns either the passed in CharSequence, or if the CharSequence is
2120- * whitespace, empty ("") or {@code null}, the value supplied by {@code defaultStrSupplier}.
2123+ * Returns either the passed in CharSequence, or if the CharSequence is {@link #isBlank(CharSequence) blank} (whitespaces, empty ({@code ""}) or
2124+ * {@code null}) , the value supplied by {@code defaultStrSupplier}.
21212125 *
2122- * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
2126+ * <p>
2127+ * Whitespace is defined by {@link Character#isWhitespace(char)}.
2128+ * </p>
21232129 *
2124- * <p>Caller responsible for thread-safety and exception handling of default value supplier</p>
2130+ * <p>
2131+ * Caller responsible for thread-safety and exception handling of default value supplier
2132+ * </p>
21252133 *
21262134 * <pre>
21272135 * {@code
@@ -2132,12 +2140,14 @@ public static int getFuzzyDistance(final CharSequence term, final CharSequence q
21322140 * StringUtils.getIfBlank("", () -> null) = null
21332141 * StringUtils.getIfBlank("", null) = null
21342142 * }</pre>
2135- * @param <T> the specific kind of CharSequence
2136- * @param str the CharSequence to check, may be null
2137- * @param defaultSupplier the supplier of default CharSequence to return
2138- * if the input is whitespace, empty ("") or {@code null}, may be null
2143+ *
2144+ * @param <T> the specific kind of CharSequence
2145+ * @param str the CharSequence to check, may be null
2146+ * @param defaultSupplier the supplier of default CharSequence to return if the input is {@link #isBlank(CharSequence) blank} (whitespaces, empty
2147+ * ({@code ""}) or {@code null}); may be null
21392148 * @return the passed in CharSequence, or the default
21402149 * @see StringUtils#defaultString(String, String)
2150+ * @see #isBlank(CharSequence)
21412151 * @since 3.10
21422152 */
21432153 public static <T extends CharSequence > T getIfBlank (final T str , final Supplier <T > defaultSupplier ) {
@@ -3339,9 +3349,11 @@ public static boolean isAlphaSpace(final CharSequence cs) {
33393349 }
33403350
33413351 /**
3342- * Tests if any of the CharSequences are empty ("" ) or null or whitespace only .
3352+ * Tests if any of the CharSequences are {@link #isBlank(CharSequence) blank} (whitespaces, empty ({@code ""} ) or {@code null}) .
33433353 *
3344- * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
3354+ * <p>
3355+ * Whitespace is defined by {@link Character#isWhitespace(char)}.
3356+ * </p>
33453357 *
33463358 * <pre>
33473359 * StringUtils.isAnyBlank((String) null) = true
@@ -3357,8 +3369,9 @@ public static boolean isAlphaSpace(final CharSequence cs) {
33573369 * StringUtils.isAnyBlank("foo", "bar") = false
33583370 * </pre>
33593371 *
3360- * @param css the CharSequences to check, may be null or empty
3361- * @return {@code true} if any of the CharSequences are empty or null or whitespace only
3372+ * @param css the CharSequences to check, may be null or empty
3373+ * @return {@code true} if any of the CharSequences are {@link #isBlank(CharSequence) blank} (whitespaces, empty ({@code ""}) or {@code null})
3374+ * @see #isBlank(CharSequence)
33623375 * @since 3.2
33633376 */
33643377 public static boolean isAnyBlank (final CharSequence ... css ) {
@@ -3445,9 +3458,7 @@ public static boolean isAsciiPrintable(final CharSequence cs) {
34453458 }
34463459
34473460 /**
3448- * Tests if a CharSequence is empty (""), null or whitespace only.
3449- *
3450- * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
3461+ * Tests if a CharSequence is empty ({@code "")}, null, or contains only whitespace as defined by {@link Character#isWhitespace(char)}.
34513462 *
34523463 * <pre>
34533464 * StringUtils.isBlank(null) = true
@@ -3457,7 +3468,7 @@ public static boolean isAsciiPrintable(final CharSequence cs) {
34573468 * StringUtils.isBlank(" bob ") = false
34583469 * </pre>
34593470 *
3460- * @param cs the CharSequence to check, may be null
3471+ * @param cs the CharSequence to check, may be null
34613472 * @return {@code true} if the CharSequence is null, empty or whitespace only
34623473 * @since 2.0
34633474 * @since 3.0 Changed signature from isBlank(String) to isBlank(CharSequence)
@@ -3594,9 +3605,11 @@ public static boolean isNoneEmpty(final CharSequence... css) {
35943605 }
35953606
35963607 /**
3597- * Tests if a CharSequence is not empty (""), not null and not whitespace only .
3608+ * Tests if a CharSequence is not {@link #isBlank(CharSequence) blank} (whitespaces, empty ({@code ""}) or {@code null}) .
35983609 *
3599- * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
3610+ * <p>
3611+ * Whitespace is defined by {@link Character#isWhitespace(char)}.
3612+ * </p>
36003613 *
36013614 * <pre>
36023615 * StringUtils.isNotBlank(null) = false
@@ -3606,9 +3619,9 @@ public static boolean isNoneEmpty(final CharSequence... css) {
36063619 * StringUtils.isNotBlank(" bob ") = true
36073620 * </pre>
36083621 *
3609- * @param cs the CharSequence to check, may be null
3610- * @return {@code true} if the CharSequence is
3611- * not empty and not null and not whitespace only
3622+ * @param cs the CharSequence to check, may be null
3623+ * @return {@code true} if the CharSequence is not {@link #isBlank(CharSequence) blank} (whitespaces, empty ({@code ""}) or {@code null})
3624+ * @see #isBlank(CharSequence)
36123625 * @since 2.0
36133626 * @since 3.0 Changed signature from isNotBlank(String) to isNotBlank(CharSequence)
36143627 */
0 commit comments