| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | describeMismatch(Object
The item that the Matcher has rejected. item, Description The description to be built or appended to. mismatchDescription)Overrides org. Implements org. |
| public final boolean | matches(Object
the object against which the matcher is evaluated. item)Implements org. |
| protected abstract boolean |
| DiagnosingMatcher | back to summary |
|---|---|
| public DiagnosingMatcher() | |
| describeMismatch | back to summary |
|---|---|
| public final void describeMismatch(Object item, Description mismatchDescription) Overrides org. Implements org. Doc from org. Generate a description of why the matcher has not accepted the item.
The description will be part of a larger description of why a matching
failed, so it should be concise.
This method assumes that
| |
| matches | back to summary |
|---|---|
| public final boolean matches(Object item) Implements org. Doc from org. Evaluates the matcher for argument item. This method matches against Object, instead of the generic type T. This is because the caller of the Matcher does not know at runtime what the type is (because of type erasure with Java generics). It is down to the implementations to check the correct type. | |
| matches | back to summary |
|---|---|
| protected abstract boolean matches(Object item, Description mismatchDescription) | |