@HashCodeAndEqualsPlugin.Enhance public class StringMatcher extends ElementMatcher.Junction.AbstractBase<java.lang.String>
StringMatcher.Mode
.Modifier and Type | Class and Description |
---|---|
static class |
StringMatcher.Mode
Defines the mode a
StringMatcher compares to strings with. |
ElementMatcher.Junction.AbstractBase<V>, ElementMatcher.Junction.Conjunction<W>, ElementMatcher.Junction.Disjunction<W>
ElementMatcher.Junction<S>
Modifier and Type | Field and Description |
---|---|
private StringMatcher.Mode |
mode
The mode to apply for matching the given value against the matcher's input.
|
private java.lang.String |
value
The text value to match against.
|
Constructor and Description |
---|
StringMatcher(java.lang.String value,
StringMatcher.Mode mode)
Creates a new string matcher.
|
Modifier and Type | Method and Description |
---|---|
boolean |
matches(java.lang.String target)
Matches a target against this element matcher.
|
java.lang.String |
toString() |
and, or
private final java.lang.String value
private final StringMatcher.Mode mode
public StringMatcher(java.lang.String value, StringMatcher.Mode mode)
value
- The value that is the base of the matching.mode
- The mode to apply for matching the given value against the matcher's inputpublic boolean matches(java.lang.String target)
target
- The instance to be matched.true
if the given element is matched by this matcher or false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object