Class CollectionItemMatcher<T>
java.lang.Object
net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<Iterable<? extends T>>
net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<Iterable<? extends T>>
net.bytebuddy.matcher.CollectionItemMatcher<T>
- Type Parameters:
T- The type of the matched entity.
- All Implemented Interfaces:
ElementMatcher<Iterable<? extends T>>, ElementMatcher.Junction<Iterable<? extends T>>
@Enhance
public class CollectionItemMatcher<T>
extends ElementMatcher.Junction.ForNonNullValues<Iterable<? extends T>>
A list item matcher matches any element of a collection to a given matcher and assures that at least one
element matches the supplied iterable condition.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ElementMatcher
ElementMatcher.Junction<S>Nested classes/interfaces inherited from interface ElementMatcher.Junction
ElementMatcher.Junction.AbstractBase<V>, ElementMatcher.Junction.Conjunction<W>, ElementMatcher.Junction.Disjunction<W>, ElementMatcher.Junction.ForNonNullValues<W> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ElementMatcher<? super T> The element matcher to apply to each element of a collection. -
Constructor Summary
ConstructorsConstructorDescriptionCollectionItemMatcher(ElementMatcher<? super T> matcher) Creates a new matcher that applies another matcher to each element of a matched iterable collection. -
Method Summary
Methods inherited from class ElementMatcher.Junction.ForNonNullValues
matchesMethods inherited from class ElementMatcher.Junction.AbstractBase
and, or
-
Field Details
-
matcher
The element matcher to apply to each element of a collection.
-
-
Constructor Details
-
CollectionItemMatcher
Creates a new matcher that applies another matcher to each element of a matched iterable collection.- Parameters:
matcher- The element matcher to apply to each element of a iterable collection.
-
-
Method Details
-
doMatch
Matches the supplied value if it was found not to benull.- Specified by:
doMatchin classElementMatcher.Junction.ForNonNullValues<Iterable<? extends T>>- Parameters:
target- The instance to be matched.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-
toString
-