public class ListWithAllOfMatcher extends ListMatcher
matchers
match against at least one item in a given List.Constructor and Description |
---|
ListWithAllOfMatcher(org.hamcrest.Matcher... 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<?> items)
Evaluates the matcher for argument
item . |
describeTo, failedMatcherMessage, getLastSeparator, getMatchers, matches, matchRemainder, reportFailed
public ListWithAllOfMatcher(org.hamcrest.Matcher... 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<?> items)
ListMatcher
item
. 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
items
- the object against which the matcher is evaluated.true
if item
matches, otherwise false
.BaseMatcher
protected void describeCollectionType(org.hamcrest.Description description)
ListMatcher
describeCollectionType
in class ListMatcher
description
- the description to append the collection type toCopyright © 2010-2014. All Rights Reserved.