ValueConverter<String>
public class RegexMatcher extends Object implements ValueConverter<String>
Constructor | Description |
---|---|
RegexMatcher(String pattern,
int flags) |
Creates a matcher that uses the given regular expression, modified by the given flags.
|
Modifier and Type | Method | Description |
---|---|---|
String |
convert(String value) |
Converts the given string value into a Java type.
|
static ValueConverter<String> |
regex(String pattern) |
Gives a matcher that uses the given regular expression.
|
String |
valuePattern() |
Gives a string that describes the pattern of the values this converter expects, if any.
|
Class<String> |
valueType() |
Gives the class of the type of values this converter converts to.
|
public RegexMatcher(String pattern, int flags)
pattern
- the regular expression patternflags
- modifying regex flagsIllegalArgumentException
- if bit values other than those corresponding to the defined match flags are
set in flags
PatternSyntaxException
- if the expression's syntax is invalidpublic static ValueConverter<String> regex(String pattern)
pattern
- the regular expression patternPatternSyntaxException
- if the expression's syntax is invalidpublic String convert(String value)
ValueConverter
convert
in interface ValueConverter<String>
value
- the string to convertpublic Class<String> valueType()
ValueConverter
valueType
in interface ValueConverter<String>
public String valuePattern()
ValueConverter
date format string
.valuePattern
in interface ValueConverter<String>
null
if there's nothing interesting hereCopyright © 2019. All rights reserved.