T
- public abstract class DiagnosingMatcher<T> extends BaseMatcher<T>
Constructor and Description |
---|
DiagnosingMatcher() |
Modifier and Type | Method and Description |
---|---|
void |
describeMismatch(java.lang.Object item,
Description mismatchDescription)
Generate a description of why the matcher has not accepted the item.
|
boolean |
matches(java.lang.Object item)
Evaluates the matcher for argument item.
|
protected abstract boolean |
matches(java.lang.Object item,
Description mismatchDescription) |
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
describeTo
public final boolean matches(java.lang.Object item)
Matcher
item
- the object against which the matcher is evaluated.true
if item matches, otherwise false
.BaseMatcher
public final void describeMismatch(java.lang.Object item, Description mismatchDescription)
Matcher
matches(item)
is false, but
will not check this.describeMismatch
in interface Matcher<T>
describeMismatch
in class BaseMatcher<T>
item
- The item that the Matcher has rejected.mismatchDescription
- The description to be built or appended to.protected abstract boolean matches(java.lang.Object item, Description mismatchDescription)