Matcher<java.lang.Iterable<? extends E>>, SelfDescribingpublic class IsEmptyIterable<E> extends TypeSafeMatcher<java.lang.Iterable<? extends E>>
| Constructor | Description |
|---|---|
IsEmptyIterable() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
describeMismatchSafely(java.lang.Iterable<? extends E> iter,
Description mismatchDescription) |
Subclasses should override this.
|
void |
describeTo(Description description) |
Generates a description of the object.
|
static <E> Matcher<java.lang.Iterable<? extends E>> |
emptyIterable() |
Creates a matcher for
Iterables matching examined iterables that yield no items. |
static <E> Matcher<java.lang.Iterable<E>> |
emptyIterableOf(java.lang.Class<E> type) |
Creates a matcher for
Iterables matching examined iterables that yield no items. |
boolean |
matchesSafely(java.lang.Iterable<? extends E> iterable) |
Subclasses should implement this.
|
_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdescribeMismatch, matchespublic boolean matchesSafely(java.lang.Iterable<? extends E> iterable)
TypeSafeMatchermatchesSafely in class TypeSafeMatcher<java.lang.Iterable<? extends E>>public void describeMismatchSafely(java.lang.Iterable<? extends E> iter, Description mismatchDescription)
TypeSafeMatcherdescribeMismatchSafely in class TypeSafeMatcher<java.lang.Iterable<? extends E>>public void describeTo(Description description)
SelfDescribingdescription - The description to be built or appended to.public static <E> Matcher<java.lang.Iterable<? extends E>> emptyIterable()
Iterables matching examined iterables that yield no items.
For example:
assertThat(new ArrayList<String>(), is(emptyIterable()))
public static <E> Matcher<java.lang.Iterable<E>> emptyIterableOf(java.lang.Class<E> type)
Iterables matching examined iterables that yield no items.
For example:
assertThat(new ArrayList<String>(), is(emptyIterableOf(String.class)))
type - the type of the iterable's content