org.hamcrest.collection
public class IsCollectionContaining<T> extends TypeSafeMatcher<Iterable<T>>
| Constructor and Description |
|---|
IsCollectionContaining(Matcher<? extends T> elementMatcher) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(Description description)
Generates a description of the object.
|
static <T> Matcher<Iterable<T>> |
hasItem(Matcher<? extends T> elementMatcher) |
static <T> Matcher<Iterable<T>> |
hasItem(T element) |
static <T> Matcher<Iterable<T>> |
hasItems(Matcher<? extends T>... elementMatchers) |
static <T> Matcher<Iterable<T>> |
hasItems(T... elements) |
boolean |
matchesSafely(Iterable<T> collection)
Subclasses should implement this.
|
matches_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringpublic boolean matchesSafely(Iterable<T> collection)
TypeSafeMatchermatchesSafely in class TypeSafeMatcher<Iterable<T>>public void describeTo(Description description)
SelfDescribingdescription - The description to be built or appended to.