public class IsArrayWithSize<E> extends FeatureMatcher<E[],java.lang.Integer>
Constructor and Description |
---|
IsArrayWithSize(Matcher<? super java.lang.Integer> sizeMatcher) |
Modifier and Type | Method and Description |
---|---|
static <E> Matcher<E[]> |
arrayWithSize(int size)
This is a shortcut to the frequently used arrayWithSize(equalTo(x)).
|
static <E> Matcher<E[]> |
arrayWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
Does array size satisfy a given matcher?
|
static <E> Matcher<E[]> |
emptyArray()
Matches an empty array.
|
protected java.lang.Integer |
featureValueOf(E[] actual)
Implement this to extract the interesting feature.
|
describeTo, matchesSafely
describeMismatch, matches
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
public IsArrayWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
protected java.lang.Integer featureValueOf(E[] actual)
FeatureMatcher
featureValueOf
in class FeatureMatcher<E[],java.lang.Integer>
actual
- the target objectpublic static <E> Matcher<E[]> arrayWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
public static <E> Matcher<E[]> arrayWithSize(int size)
public static <E> Matcher<E[]> emptyArray()