Top Fields Constructors Methods
org.hamcrest.core

public abstract Class SubstringMatcher

extends TypeSafeMatcher<String>
Class Inheritance
Known Direct Subclasses
org.hamcrest.core.StringContains, org.hamcrest.core.StringEndsWith, org.hamcrest.core.StringStartsWith
Imports
org.hamcrest.Description, .TypeSafeMatcher

Field Summary

Modifier and TypeField and Description
protected final String

Constructor Summary

AccessConstructor and Description
protected
SubstringMatcher(final String substring)

Method Summary

Modifier and TypeMethod and Description
public void
describeMismatchSafely(String item, Description mismatchDescription)

Overrides org.hamcrest.TypeSafeMatcher.describeMismatchSafely.

Subclasses should override this.
public void
describeTo(Description
The description to be built or appended to.
description
)

Implements org.hamcrest.SelfDescribing.describeTo.

Generates a description of the object.
protected abstract boolean
public boolean
matchesSafely(String item)

Implements abstract org.hamcrest.TypeSafeMatcher.matchesSafely.

Subclasses should implement this.
protected abstract String
Inherited from org.hamcrest.TypeSafeMatcher:
describeMismatchmatches

Field Detail

substringback to summary
protected final String substring

Constructor Detail

SubstringMatcherback to summary
protected SubstringMatcher(final String substring)

Method Detail

describeMismatchSafelyback to summary
public void describeMismatchSafely(String item, Description mismatchDescription)

Overrides org.hamcrest.TypeSafeMatcher.describeMismatchSafely.

Doc from org.hamcrest.TypeSafeMatcher.describeMismatchSafely.

Subclasses should override this. The item will already have been checked for the specific type and will never be null.

Annotations
@Override
describeToback to summary
public void describeTo(Description description)

Implements org.hamcrest.SelfDescribing.describeTo.

Doc from org.hamcrest.SelfDescribing.describeTo.

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.

Parameters
description:Description

The description to be built or appended to.

Annotations
@Override
evalSubstringOfback to summary
protected abstract boolean evalSubstringOf(String string)
matchesSafelyback to summary
public boolean matchesSafely(String item)

Implements abstract org.hamcrest.TypeSafeMatcher.matchesSafely.

Doc from org.hamcrest.TypeSafeMatcher.matchesSafely.

Subclasses should implement this. The item will already have been checked for the specific type and will never be null.

Annotations
@Override
relationshipback to summary
protected abstract String relationship()