public class ListWithAllOfMatcher<T> extends ListMatcher<T>
matchers match against at least one item in a given List.| Constructor and Description |
|---|
ListWithAllOfMatcher(org.hamcrest.Matcher<T>... matchers)
Construct a matcher that will return true if all the given
matchers match against at least one
item in any given List. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
describeCollectionType(org.hamcrest.Description description)
Describes the type of collection expected.
|
boolean |
matchesList(List<T> items)
Evaluates the matcher for argument
item. |
describeTo, failedMatcherMessage, getLastSeparator, getMatchers, matches, matchRemainder, reportFailed@SafeVarargs public ListWithAllOfMatcher(org.hamcrest.Matcher<T>... matchers)
matchers match against at least one
item in any given List.matchers - The matchers that must match against at least one item in the list.public boolean matchesList(List<T> items)
ListMatcheritem. The item has been verified to be a list, but the exact
type of contents of a list cannot be verified, due to Erasure of Generic Types.matchesList in class ListMatcher<T>items - the object against which the matcher is evaluated.true if item matches, otherwise false.BaseMatcherprotected void describeCollectionType(org.hamcrest.Description description)
ListMatcherdescribeCollectionType in class ListMatcher<T>description - the description to append the collection type toCopyright © 2010–2023. All rights reserved.