T
- the enclosing type of the objects that matchpublic abstract class Matcher<T> extends Object
Constructor and Description |
---|
Matcher() |
Modifier and Type | Method and Description |
---|---|
boolean |
matches(Object object)
Returns true if this object matches successfully.
|
protected abstract boolean |
matchesSafely(T object)
Returns
true if the supplied object matches against this matcher. |
public final boolean matches(Object object)
This method checks for a type match against the erased type of this matcher
and then defers to the matchesSafely(Object)
of this matcher with the
type-checked and cast object.
object
- object to be checkedtrue
if the object matchesprotected abstract boolean matchesSafely(T object)
true
if the supplied object matches against this matcher.object
- object to check for a matchtrue
on a matchCopyright © 2016. All rights reserved.