public class StringTextMatcher extends Object implements TextMatcher
String values. Matching is perform by equality or by regular expression matching.| Constructor and Description |
|---|
StringTextMatcher(String... values)
Creates a new
StringTextMatcher. |
| Modifier and Type | Method and Description |
|---|---|
String |
description() |
String |
formattedValues() |
boolean |
isMatching(String text)
Indicates whether the given text matches the
String values in this matcher. |
public StringTextMatcher(@Nonnull String... values)
StringTextMatcher.values - the String values to match. Each value can be a regular expression.NullPointerException - if the array of values is null.IllegalArgumentException - if the array of values is empty.public boolean isMatching(@Nullable String text)
String values in this matcher. Each value can be a regular
expression.isMatching in interface TextMatchertext - the text to verify.true if the given text matches the String values in this matcher, false otherwise.@Nonnull public String description()
description in interface TextMatcher@Nonnull public String formattedValues()
formattedValues in interface TextMatcherString values in this matcher, formatted as a single String.Copyright © 2014 AssertJ. All rights reserved.