Browse Source

Polish firstRunOf javadoc

pull/23394/head
Phillip Webb 6 years ago
parent
commit
1e830f725c
  1. 9
      spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationPredicates.java

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

@ -82,9 +82,12 @@ public abstract class MergedAnnotationPredicates { @@ -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.
* <p>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.
* <p>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

Loading…
Cancel
Save