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