public class ContainsPattern extends TypesafeQuickMatcher<CharSequence>
Use the static factory methods to create instances.
| Constructor and Description |
|---|
ContainsPattern(Pattern p) |
ContainsPattern(Pattern p,
boolean match) |
ContainsPattern(String regex) |
ContainsPattern(String regex,
boolean match) |
| Modifier and Type | Method and Description |
|---|---|
static org.hamcrest.Matcher<CharSequence> |
containsPattern(Pattern p)
Can the given pattern be found in the string?
|
static org.hamcrest.Matcher<CharSequence> |
containsPattern(String regex)
Can the given pattern be found in the string?
|
protected void |
describeMismatchSafely(CharSequence item,
org.hamcrest.Description mismatch) |
void |
describeTo(org.hamcrest.Description description) |
static org.hamcrest.Matcher<CharSequence> |
matchesPattern(Pattern p)
Does the pattern match the entire string?
|
static org.hamcrest.Matcher<CharSequence> |
matchesPattern(String regex)
Does the pattern match the entire string?
|
protected boolean |
matchesSafely(CharSequence item) |
describeMismatch, matchesmatches, matchResult_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringpublic ContainsPattern(Pattern p, boolean match)
public ContainsPattern(Pattern p)
public ContainsPattern(String regex, boolean match)
public ContainsPattern(String regex)
public void describeTo(org.hamcrest.Description description)
protected boolean matchesSafely(CharSequence item)
matchesSafely in class TypesafeQuickMatcher<CharSequence>protected void describeMismatchSafely(CharSequence item, org.hamcrest.Description mismatch)
describeMismatchSafely in class TypesafeQuickMatcher<CharSequence>public static org.hamcrest.Matcher<CharSequence> containsPattern(String regex)
regex - public static org.hamcrest.Matcher<CharSequence> containsPattern(Pattern p)
p - public static org.hamcrest.Matcher<CharSequence> matchesPattern(String regex)
regex - public static org.hamcrest.Matcher<CharSequence> matchesPattern(Pattern p)
p - Copyright © 2015. All rights reserved.