类 SubstringMatcher
- java.lang.Object
- org.hamcrest.BaseMatcher<T>
- org.hamcrest.TypeSafeMatcher<String>
- org.hamcrest.core.SubstringMatcher
- 所有已实现的接口:
Matcher<String>
,SelfDescribing
- 直接已知子类:
StringContains
,StringEndsWith
,StringStartsWith
public abstract class SubstringMatcher extends TypeSafeMatcher<String>
构造器概要
构造器 限定符 构造器 说明 protected
SubstringMatcher(String substring)
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 void
describeMismatchSafely(String item, Description mismatchDescription)
Subclasses should override this.void
describeTo(Description description)
Generates a description of the object.protected abstract boolean
evalSubstringOf(String string)
boolean
matchesSafely(String item)
Subclasses should implement this.protected abstract String
relationship()
从类继承的方法 org.hamcrest.TypeSafeMatcher
describeMismatch, matches
从类继承的方法 org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
构造器详细资料
SubstringMatcher
protected SubstringMatcher(String substring)
方法详细资料
matchesSafely
public boolean matchesSafely(String item)
从类复制的说明:TypeSafeMatcher
Subclasses should implement this. The item will already have been checked for the specific type and will never be null.- 指定者:
matchesSafely
在类中TypeSafeMatcher<String>
describeMismatchSafely
public void describeMismatchSafely(String item, Description mismatchDescription)
从类复制的说明:TypeSafeMatcher
Subclasses should override this. The item will already have been checked for the specific type and will never be null.
describeTo
public void describeTo(Description description)
从接口复制的说明:SelfDescribing
Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.- 参数:
description
- The description to be built or appended to.
evalSubstringOf
protected abstract boolean evalSubstringOf(String string)
relationship
protected abstract String relationship()