Top Fields Constructors Methods
org.hamcrest.collection

public Class ArrayAsIterableMatcher<E>

extends TypeSafeMatcher<E[]>
Class Inheritance
Imports
org.hamcrest.Description, .Matcher, .TypeSafeDiagnosingMatcher, .TypeSafeMatcher, java.util.Collection

Author
Steve Freeman 2016 http://www.hamcrest.com

Field Summary

Modifier and TypeField and Description
protected final TypeSafeDiagnosingMatcher<Iterable<? extends E>>
protected final Collection<Matcher<? super E>>
private final String

Constructor Summary

AccessConstructor and Description
public
ArrayAsIterableMatcher(TypeSafeDiagnosingMatcher<Iterable<? extends E>> iterableMatcher, Collection<Matcher<? super E>> matchers, String message)

Method Summary

Modifier and TypeMethod and Description
public void
describeMismatchSafely(E[] item, Description mismatchDescription)

Overrides org.hamcrest.TypeSafeMatcher.describeMismatchSafely.

Subclasses should override this.
public void
describeTo(Description
The description to be built or appended to.
description
)

Implements org.hamcrest.SelfDescribing.describeTo.

Generates a description of the object.
public boolean
matchesSafely(E[] item)

Implements abstract org.hamcrest.TypeSafeMatcher.matchesSafely.

Subclasses should implement this.
Inherited from org.hamcrest.TypeSafeMatcher:
describeMismatchmatches

Field Detail

iterableMatcherback to summary
protected final TypeSafeDiagnosingMatcher<Iterable<? extends E>> iterableMatcher
matchersback to summary
protected final Collection<Matcher<? super E>> matchers
messageback to summary
private final String message

Constructor Detail

ArrayAsIterableMatcherback to summary
public ArrayAsIterableMatcher(TypeSafeDiagnosingMatcher<Iterable<? extends E>> iterableMatcher, Collection<Matcher<? super E>> matchers, String message)

Method Detail

describeMismatchSafelyback to summary
public void describeMismatchSafely(E[] item, Description mismatchDescription)

Overrides org.hamcrest.TypeSafeMatcher.describeMismatchSafely.

Doc from org.hamcrest.TypeSafeMatcher.describeMismatchSafely.

Subclasses should override this. The item will already have been checked for the specific type and will never be null.

Annotations
@Override
describeToback to summary
public void describeTo(Description description)

Implements org.hamcrest.SelfDescribing.describeTo.

Doc from org.hamcrest.SelfDescribing.describeTo.

Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.

Parameters
description:Description

The description to be built or appended to.

Annotations
@Override
matchesSafelyback to summary
public boolean matchesSafely(E[] item)

Implements abstract org.hamcrest.TypeSafeMatcher.matchesSafely.

Doc from org.hamcrest.TypeSafeMatcher.matchesSafely.

Subclasses should implement this. The item will already have been checked for the specific type and will never be null.

Annotations
@Override