|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<java.lang.Iterable<? extends E>>
org.hamcrest.collection.IsEmptyIterable<E>
public class IsEmptyIterable<E>
Tests if collection is empty.
| Constructor Summary | |
|---|---|
IsEmptyIterable()
|
|
| Method Summary | ||
|---|---|---|
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
|
emptyIterable()
Creates a matcher for Iterables matching examined iterables that yield no items. |
|
static
|
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. |
|
| Methods inherited from class org.hamcrest.TypeSafeMatcher |
|---|
describeMismatch, matches |
| Methods inherited from class org.hamcrest.BaseMatcher |
|---|
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IsEmptyIterable()
| Method Detail |
|---|
public boolean matchesSafely(java.lang.Iterable<? extends E> iterable)
TypeSafeMatcher
matchesSafely in class TypeSafeMatcher<java.lang.Iterable<? extends E>>
public void describeMismatchSafely(java.lang.Iterable<? extends E> iter,
Description mismatchDescription)
TypeSafeMatcher
describeMismatchSafely in class TypeSafeMatcher<java.lang.Iterable<? extends E>>public void describeTo(Description description)
SelfDescribing
description - 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||