Skip to content

Commit 1e830f7

Browse files
committed
Polish firstRunOf javadoc
1 parent 62a3e41 commit 1e830f7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationPredicates.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,12 @@ public static <A extends Annotation> Predicate<MergedAnnotation<? extends A>> ty
8282
* Create a new stateful, single use {@link Predicate} that matches only
8383
* the first run of an extracted value. For example,
8484
* {@code MergedAnnotationPredicates.firstRunOf(MergedAnnotation::distance)}
85-
* will return the first annotation and a subsequent run of the same distance.
86-
* <p>NOTE: This predicate only matches the first first run. Once the extracted
87-
* value changes, the predicate always returns {@code false}.
85+
* will match the first annotation, and any subsequent run that have the
86+
* same distance.
87+
* <p>NOTE: This predicate only matches the first run. Once the extracted
88+
* value changes, the predicate always returns {@code false}. I.e. if you
89+
* have a set of annotations with distances {@code [1, 1, 2, 1]} then only
90+
* the first two will match.
8891
* @param valueExtractor function used to extract the value to check
8992
* @return a {@link Predicate} that matches the first run of the extracted
9093
* values

0 commit comments

Comments
 (0)