org.hamcrest.text.pattern
public class PatternMatcher extends TypeSafeMatcher<String> implements PatternComponent
Constructor and Description |
---|
PatternMatcher(PatternComponent root) |
Modifier and Type | Method and Description |
---|---|
void |
buildRegex(StringBuilder builder,
org.hamcrest.text.pattern.internal.naming.GroupNamespace groups) |
void |
describeTo(Description description)
Generates a description of the object.
|
static PatternMatcher |
matchesPattern(PatternComponent pattern) |
static PatternMatcher |
matchesPattern(PatternMatcher pattern) |
boolean |
matchesSafely(String s)
Subclasses should implement this.
|
Parse |
parse(String input) |
String |
toString() |
matches
_dont_implement_Matcher___instead_extend_BaseMatcher_
public PatternMatcher(PatternComponent root)
public static PatternMatcher matchesPattern(PatternComponent pattern)
public static PatternMatcher matchesPattern(PatternMatcher pattern)
public String toString()
toString
in class BaseMatcher<String>
public void describeTo(Description description)
SelfDescribing
describeTo
in interface SelfDescribing
description
- The description to be built or appended to.public boolean matchesSafely(String s)
TypeSafeMatcher
matchesSafely
in class TypeSafeMatcher<String>
public Parse parse(String input) throws PatternMatchException
PatternMatchException
public void buildRegex(StringBuilder builder, org.hamcrest.text.pattern.internal.naming.GroupNamespace groups)
buildRegex
in interface PatternComponent