org.hamcrest.collection
Class IsIterableWithSize<E>
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeDiagnosingMatcher<T>
org.hamcrest.FeatureMatcher<Iterable<E>,Integer>
org.hamcrest.collection.IsIterableWithSize<E>
- All Implemented Interfaces:
- Matcher<Iterable<E>>, SelfDescribing
public class IsIterableWithSize<E>
- extends FeatureMatcher<Iterable<E>,Integer>
IsIterableWithSize
public IsIterableWithSize(Matcher<? super Integer> sizeMatcher)
featureValueOf
protected Integer featureValueOf(Iterable<E> actual)
- Description copied from class:
FeatureMatcher
- Implement this to extract the interesting feature.
- Specified by:
featureValueOf
in class FeatureMatcher<Iterable<E>,Integer>
- Parameters:
actual
- the target object
- Returns:
- the feature to be matched
iterableWithSize
public static <E> Matcher<Iterable<E>> iterableWithSize(Matcher<? super Integer> sizeMatcher)
iterableWithSize
public static <E> Matcher<Iterable<E>> iterableWithSize(int size)