public class IsCollectionContaining<T> extends TypeSafeDiagnosingMatcher<java.lang.Iterable<? super T>>
Constructor and Description |
---|
IsCollectionContaining(Matcher<? super T> elementMatcher) |
Modifier and Type | Method and Description |
---|---|
void |
describeTo(Description description)
Generates a description of the object.
|
static <T> Matcher<java.lang.Iterable<? super T>> |
hasItem(Matcher<? super T> elementMatcher) |
static <T> Matcher<java.lang.Iterable<? super T>> |
hasItem(T element) |
static <T> Matcher<java.lang.Iterable<T>> |
hasItems(Matcher<? super T>... elementMatchers) |
static <T> Matcher<java.lang.Iterable<T>> |
hasItems(T... elements) |
protected boolean |
matchesSafely(java.lang.Iterable<? super T> collection,
Description mismatchDescription)
Subclasses should implement this.
|
describeMismatch, matches
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
protected boolean matchesSafely(java.lang.Iterable<? super T> collection, Description mismatchDescription)
TypeSafeDiagnosingMatcher
matchesSafely
in class TypeSafeDiagnosingMatcher<java.lang.Iterable<? super T>>
public void describeTo(Description description)
SelfDescribing
description
- The description to be built or appended to.public static <T> Matcher<java.lang.Iterable<? super T>> hasItem(Matcher<? super T> elementMatcher)
public static <T> Matcher<java.lang.Iterable<? super T>> hasItem(T element)
public static <T> Matcher<java.lang.Iterable<T>> hasItems(Matcher<? super T>... elementMatchers)
public static <T> Matcher<java.lang.Iterable<T>> hasItems(T... elements)