--- old/src/java.base/share/classes/java/util/regex/Pattern.java 2018-04-03 23:17:36.618045803 -0700 +++ new/src/java.base/share/classes/java/util/regex/Pattern.java 2018-04-03 23:17:36.360022035 -0700 @@ -5809,10 +5809,20 @@ static final Node lastAccept = new LastNode(); /** - * Creates a predicate which can be used to match a string. + * Creates a predicate that tests if for a given input string argument, an + * input sequence, there exists a subsequence that matches this pattern. * - * @return The predicate which can be used for matching on a string + * @apiNote + * This method creates a predicate that behaves as if it creates a matcher + * from the input sequence and then calls {@code find}, for example a + * predicate of the form: + *
{@code
+     *   s -> matcher(s).find();
+     * }
+ * + * @return The predicate which can be used for finding a match on a subsequence of a string * @since 1.8 + * @see Matcher#find */ public Predicate asPredicate() { return s -> matcher(s).find();