Skip to content

Most visited

Recently visited

navigation

BoundedMatcher

public abstract class BoundedMatcher
extends BaseMatcher<T>

java.lang.Object
   ↳ org.hamcrest.BaseMatcher<T>
     ↳ android.support.test.espresso.matcher.BoundedMatcher<T, S extends T>
Known Direct Subclasses


Some matcher sugar that lets you create a matcher for a given type but only process items of a specific subtype of that matcher.

Summary

Public constructors

BoundedMatcher(Class<? extends S> expectedType)
BoundedMatcher(Class<?> expectedType, Class<?> interfaceType1, Class...<?> otherInterfaces)

Public methods

final boolean matches(Object item)

Protected methods

abstract boolean matchesSafely(S item)

Inherited methods

From class org.hamcrest.BaseMatcher
From class java.lang.Object
From interface org.hamcrest.Matcher
From interface org.hamcrest.SelfDescribing

Public constructors

BoundedMatcher

BoundedMatcher (Class<? extends S> expectedType)

Parameters
expectedType Class

BoundedMatcher

BoundedMatcher (Class<?> expectedType, 
                Class<?> interfaceType1, 
                Class...<?> otherInterfaces)

Parameters
expectedType Class
interfaceType1 Class
otherInterfaces Class

Public methods

matches

boolean matches (Object item)

Parameters
item Object
Returns
boolean

Protected methods

matchesSafely

boolean matchesSafely (S item)

Parameters
item S
Returns
boolean
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.