T - public abstract class QuickMatcherBase<T> extends org.hamcrest.BaseMatcher<T> implements QuickDiagnosingMatcher<T>
QuickDiagnosingMatcher interface,
but matches and describes in separate steps.
QuickDiagnosingMatcher.matches(java.lang.Object, org.hamcrest.Description)
is implemented as
if (matches(item)) {
return true;
} else {
describeMismatch(item, description);
return false;
}
If you want to override matches(java.lang.Object, org.hamcrest.Description),
extend QuickDiagnosingMatcherBase instead.
| Constructor and Description |
|---|
QuickMatcherBase() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
describeMismatch(Object item,
org.hamcrest.Description description) |
abstract boolean |
matches(Object item) |
boolean |
matches(Object item,
org.hamcrest.Description mismatch)
if (matches(item)) {
return true;
} else {
describeMismatch(item, description);
return false;
}
|
<I> MatchResult<I> |
matchResult(I item)
Returns a
MatchResult for item |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic abstract boolean matches(Object item)
matches in interface org.hamcrest.Matcher<T>public abstract void describeMismatch(Object item, org.hamcrest.Description description)
public final boolean matches(Object item, org.hamcrest.Description mismatch)
if (matches(item)) {
return true;
} else {
describeMismatch(item, description);
return false;
}
matches in interface QuickDiagnosingMatcher<T>item - mismatch - public <I> MatchResult<I> matchResult(I item)
QuickDiagnosingMatcherMatchResult for itemmatchResult in interface QuickDiagnosingMatcher<T>Copyright © 2015. All rights reserved.