public class IsCollectionWithSize<E> extends CollectionMatcher<java.util.Collection<? extends E>>
| Constructor and Description |
|---|
IsCollectionWithSize(org.hamcrest.Matcher<? super java.lang.Integer> sizeMatcher) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description) |
static <E> org.hamcrest.Matcher<? super java.util.Collection<? extends E>> |
hasSize(int size)
This is a shortcut to the frequently used hasSize(equalTo(x)).
|
static <E> org.hamcrest.Matcher<? super java.util.Collection<? extends E>> |
hasSize(org.hamcrest.Matcher<? super java.lang.Integer> size)
Does collection size satisfy a given matcher?
|
boolean |
matchesSafely(java.util.Collection<? extends E> item) |
matchespublic IsCollectionWithSize(org.hamcrest.Matcher<? super java.lang.Integer> sizeMatcher)
public boolean matchesSafely(java.util.Collection<? extends E> item)
matchesSafely in class CollectionMatcher<java.util.Collection<? extends E>>public void describeTo(org.hamcrest.Description description)
public static <E> org.hamcrest.Matcher<? super java.util.Collection<? extends E>> hasSize(org.hamcrest.Matcher<? super java.lang.Integer> size)
public static <E> org.hamcrest.Matcher<? super java.util.Collection<? extends E>> hasSize(int size)