|
|
|
@ -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 |
|
|
|
|