|
||||||||||
| 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.util.Collection<? extends E>>
org.hamcrest.collection.IsEmptyCollection<E>
public class IsEmptyCollection<E>
Tests if collection is empty.
| Constructor Summary | |
|---|---|
IsEmptyCollection()
|
|
| Method Summary | ||
|---|---|---|
void |
describeMismatchSafely(java.util.Collection<? extends E> item,
Description mismatchDescription)
Subclasses should override this. |
|
void |
describeTo(Description description)
Generates a description of the object. |
|
static
|
empty()
Creates a matcher for Collections matching examined collections whose isEmpty
method returns true. |
|
static
|
emptyCollectionOf(java.lang.Class<E> type)
Creates a matcher for Collections matching examined collections whose isEmpty
method returns true. |
|
boolean |
matchesSafely(java.util.Collection<? extends E> item)
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 IsEmptyCollection()
| Method Detail |
|---|
public boolean matchesSafely(java.util.Collection<? extends E> item)
TypeSafeMatcher
matchesSafely in class TypeSafeMatcher<java.util.Collection<? extends E>>
public void describeMismatchSafely(java.util.Collection<? extends E> item,
Description mismatchDescription)
TypeSafeMatcher
describeMismatchSafely in class TypeSafeMatcher<java.util.Collection<? extends E>>public void describeTo(Description description)
SelfDescribing
description - The description to be built or appended to.public static <E> Matcher<java.util.Collection<? extends E>> empty()
Collections matching examined collections whose isEmpty
method returns true.
For example:
assertThat(new ArrayList<String>(), is(empty()))
public static <E> Matcher<java.util.Collection<E>> emptyCollectionOf(java.lang.Class<E> type)
Collections matching examined collections whose isEmpty
method returns true.
For example:
assertThat(new ArrayList<String>(), is(emptyCollectionOf(String.class)))
type - the type of the collection's content
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||