类 Every<T>
- java.lang.Object
- org.hamcrest.BaseMatcher<T>
- org.hamcrest.TypeSafeDiagnosingMatcher<Iterable<T>>
- org.hamcrest.core.Every<T>
- 所有已实现的接口:
Matcher<Iterable<T>>
,SelfDescribing
public class Every<T> extends TypeSafeDiagnosingMatcher<Iterable<T>>
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 void
describeTo(Description description)
Generates a description of the object.static <U> Matcher<Iterable<U>>
everyItem(Matcher<U> itemMatcher)
boolean
matchesSafely(Iterable<T> collection, Description mismatchDescription)
Subclasses should implement this.从类继承的方法 org.hamcrest.TypeSafeDiagnosingMatcher
describeMismatch, matches
从类继承的方法 org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
方法详细资料
matchesSafely
public boolean matchesSafely(Iterable<T> collection, Description mismatchDescription)
从类复制的说明:TypeSafeDiagnosingMatcher
Subclasses should implement this. The item will already have been checked for the specific type and will never be null.- 指定者:
matchesSafely
在类中TypeSafeDiagnosingMatcher<Iterable<T>>
describeTo
public void describeTo(Description description)
从接口复制的说明:SelfDescribing
Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.- 参数:
description
- The description to be built or appended to.
everyItem
public static <U> Matcher<Iterable<U>> everyItem(Matcher<U> itemMatcher)
Creates a matcher forIterable
s that only matches when a single pass over the examinedIterable
yields items that are all matched by the specifieditemMatcher
. For example:assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))
- 参数:
itemMatcher
- the matcher to apply to every item provided by the examinedIterable