X - Type of item.public final class HasValuesMatching<X> extends MatcherEnvelope<Iterable<X>>
Iterable has elements matched by particular
function.
Here is an example how HasValuesMatching can be used:
MatcherAssert.assertThat(
new ListOf<>(1, 2, 3),
new HasValuesMatching<>(value -> value > 2 || value == 3)
);| Constructor and Description |
|---|
HasValuesMatching(org.cactoos.Func<X,Boolean> fnc)
Ctor.
|
describeMismatchSafely, describeTo, matchesSafelyCopyright © 2017–2019 jcabi.com. All rights reserved.