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, matchesSafely
describeMismatch, matches
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
protected Integer featureValueOf(Collection<? extends E> actual)
FeatureMatcher
featureValueOf
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.