|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hamcrest.BaseMatcher<T> org.hamcrest.TypeSafeDiagnosingMatcher<java.lang.Iterable<T>> org.hamcrest.core.Every<T>
public class Every<T>
Constructor Summary | |
---|---|
Every(Matcher<? super T> matcher)
|
Method Summary | ||
---|---|---|
void |
describeTo(Description description)
Generates a description of the object. |
|
static
|
everyItem(Matcher<U> itemMatcher)
Creates a matcher for Iterable s that only matches when a single pass over the
examined Iterable yields items that are all matched by the specified
itemMatcher . |
|
boolean |
matchesSafely(java.lang.Iterable<T> collection,
Description mismatchDescription)
Subclasses should implement this. |
Methods inherited from class org.hamcrest.TypeSafeDiagnosingMatcher |
---|
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 Every(Matcher<? super T> matcher)
Method Detail |
---|
public boolean matchesSafely(java.lang.Iterable<T> collection, Description mismatchDescription)
TypeSafeDiagnosingMatcher
matchesSafely
in class TypeSafeDiagnosingMatcher<java.lang.Iterable<T>>
public void describeTo(Description description)
SelfDescribing
description
- The description to be built or appended to.public static <U> Matcher<java.lang.Iterable<U>> everyItem(Matcher<U> itemMatcher)
Iterable
s that only matches when a single pass over the
examined Iterable
yields items that are all matched by the specified
itemMatcher
.
For example:
assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))
itemMatcher
- the matcher to apply to every item provided by the examined Iterable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |