From 1e830f725c636d9c17c693950c273827d6efe39d Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 1 Aug 2019 08:29:02 +0100 Subject: [PATCH] Polish firstRunOf javadoc --- .../core/annotation/MergedAnnotationPredicates.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationPredicates.java b/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationPredicates.java index 71d49b66fe..c53b5b8d09 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationPredicates.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationPredicates.java @@ -82,9 +82,12 @@ public abstract class MergedAnnotationPredicates { * Create a new stateful, single use {@link Predicate} that matches only * the first run of an extracted value. For example, * {@code MergedAnnotationPredicates.firstRunOf(MergedAnnotation::distance)} - * will return the first annotation and a subsequent run of the same distance. - *

NOTE: This predicate only matches the first first run. Once the extracted - * value changes, the predicate always returns {@code false}. + * will match the first annotation, and any subsequent run that have the + * same distance. + *

NOTE: This predicate only matches the first run. Once the extracted + * value changes, the predicate always returns {@code false}. I.e. if you + * have a set of annotations with distances {@code [1, 1, 2, 1]} then only + * the first two will match. * @param valueExtractor function used to extract the value to check * @return a {@link Predicate} that matches the first run of the extracted * values