public class IsCollectionWithSize<E> extends FeatureMatcher<Collection<? extends E>,Integer>
| Constructor and Description |
|---|
IsCollectionWithSize(Matcher<? super Integer> sizeMatcher) |
| Modifier and Type | Method and Description |
|---|---|
protected Integer |
featureValueOf(Collection<? extends E> actual)
Implement this to extract the interesting feature.
|
static <E> Matcher<? super Collection<? extends E>> |
hasSize(int size)
This is a shortcut to the frequently used hasSize(equalTo(x)).
|
static <E> Matcher<? super Collection<? extends E>> |
hasSize(Matcher<? super Integer> size)
Does collection size satisfy a given matcher?
|
describeTo, matchesSafelydescribeMismatch, matches_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringprotected Integer featureValueOf(Collection<? extends E> actual)
FeatureMatcherfeatureValueOf in class FeatureMatcher<Collection<? extends E>,Integer>actual - the target objectpublic static <E> Matcher<? super Collection<? extends E>> hasSize(Matcher<? super Integer> size)
public static <E> Matcher<? super Collection<? extends E>> hasSize(int size)
Copyright © 2016. All rights reserved.