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 overridematches(java.lang.Object, org.hamcrest.Description), extendQuickDiagnosingMatcherBaseinstead.
| 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;
}
|
_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 - Copyright © 2013. All Rights Reserved.