Matcher<T>
, SelfDescribing
StringContains
, StringEndsWith
, StringStartsWith
public abstract class SubstringMatcher extends TypeSafeMatcher<java.lang.String>
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.String |
substring |
Modifier | Constructor | Description |
---|---|---|
protected |
SubstringMatcher(java.lang.String substring) |
Modifier and Type | Method | Description |
---|---|---|
void |
describeMismatchSafely(java.lang.String item,
Description mismatchDescription) |
Subclasses should override this.
|
void |
describeTo(Description description) |
Generates a description of the object.
|
protected abstract boolean |
evalSubstringOf(java.lang.String string) |
|
boolean |
matchesSafely(java.lang.String item) |
Subclasses should implement this.
|
protected abstract java.lang.String |
relationship() |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
describeMismatch, matches
public boolean matchesSafely(java.lang.String item)
TypeSafeMatcher
matchesSafely
in class TypeSafeMatcher<java.lang.String>
public void describeMismatchSafely(java.lang.String item, Description mismatchDescription)
TypeSafeMatcher
describeMismatchSafely
in class TypeSafeMatcher<java.lang.String>
public void describeTo(Description description)
SelfDescribing
description
- The description to be built or appended to.protected abstract boolean evalSubstringOf(java.lang.String string)
protected abstract java.lang.String relationship()