public class MatchesPattern extends TypeSafeMatcher<java.lang.String>
| Constructor and Description |
|---|
MatchesPattern(java.util.regex.Pattern pattern) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(Description description)
Generates a description of the object.
|
static Matcher<java.lang.String> |
matchesPattern(java.util.regex.Pattern pattern)
Creates a matcher of
String that matches when the examined string
exactly matches the given Pattern. |
static Matcher<java.lang.String> |
matchesPattern(java.lang.String regex)
Creates a matcher of
String that matches when the examined string
exactly matches the given regular expression, treated as a Pattern. |
protected boolean |
matchesSafely(java.lang.String item)
Subclasses should implement this.
|
describeMismatch, describeMismatchSafely, matches_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringprotected boolean matchesSafely(java.lang.String item)
TypeSafeMatchermatchesSafely in class TypeSafeMatcher<java.lang.String>public void describeTo(Description description)
SelfDescribingdescription - The description to be built or appended to.public static Matcher<java.lang.String> matchesPattern(java.util.regex.Pattern pattern)
String that matches when the examined string
exactly matches the given Pattern.public static Matcher<java.lang.String> matchesPattern(java.lang.String regex)
String that matches when the examined string
exactly matches the given regular expression, treated as a Pattern.