@@ -1589,6 +1589,11 @@ public int length() {
15891589 * @return {@code true} if {@link #length()} is {@code 0}, otherwise
15901590 * {@code false}
15911591 *
1592+ * @apiNote
1593+ * To determine whether a string contains only
1594+ * {@linkplain Character#isWhitespace(int) white space}, use
1595+ * {@link #isBlank() isBlank}.
1596+ *
15921597 * @since 1.6
15931598 */
15941599 @ Override
@@ -3827,9 +3832,13 @@ public String toUpperCase() {
38273832 * begins with the character at index <i>k</i> and ends with the
38283833 * character at index <i>m</i>-that is, the result of
38293834 * {@code this.substring(k, m + 1)}.
3830- * <p>
3831- * This method may be used to trim space (as defined above) from
3832- * the beginning and end of a string.
3835+ *
3836+ * @apiNote
3837+ * This method removes leading and trailing space characters and ASCII control
3838+ * characters from the string. To remove characters using a Unicode-based definition of
3839+ * {@linkplain Character#isWhitespace(int) white space}, use {@link #strip() strip},
3840+ * {@link #stripIndent() stripIndent}, {@link #stripLeading() stripLeading}, or
3841+ * {@link #stripTrailing() stripTrailing}.
38333842 *
38343843 * @return a string whose value is this string, with all leading
38353844 * and trailing space removed, or this string if it
@@ -3934,13 +3943,9 @@ public String stripTrailing() {
39343943 }
39353944
39363945 /**
3937- * Returns {@code true} if the string is empty or contains only
3938- * {@linkplain Character#isWhitespace(int) white space} codepoints,
3939- * otherwise {@code false}.
3940- *
3941- * @return {@code true} if the string is empty or contains only
3942- * {@linkplain Character#isWhitespace(int) white space} codepoints,
3943- * otherwise {@code false}
3946+ * {@return {@code true} if the string is {@linkplain #isEmpty empty} or contains
3947+ * only {@linkplain Character#isWhitespace(int) white space} codepoints,
3948+ * otherwise {@code false}}
39443949 *
39453950 * @see Character#isWhitespace(int)
39463951 *
0 commit comments