public abstract class

BoundedMatcher

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

Class Overview

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)
[Expand]
Inherited Methods
From class org.hamcrest.BaseMatcher
From class java.lang.Object
From interface org.hamcrest.Matcher
From interface org.hamcrest.SelfDescribing

Public Constructors

public BoundedMatcher (Class<? extends S> expectedType)

Parameters
expectedType Class

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

Parameters
expectedType Class
interfaceType1 Class
otherInterfaces Class

Public Methods

public final boolean matches (Object item)

Parameters
item Object
Returns
boolean

Protected Methods

protected abstract boolean matchesSafely (S item)

Parameters
item S
Returns
boolean