|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjoptsimple.util.RegexMatcher
public class RegexMatcher
Ensures that values entirely match a regular expression.
| Constructor Summary | |
|---|---|
RegexMatcher(String pattern,
int flags)
Creates a matcher that uses the given regular expression, modified by the given flags. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RegexMatcher(String pattern,
int flags)
pattern - the regular expression patternflags - modifying regex flags
IllegalArgumentException - if bit values other than those corresponding to the defined match flags are
set in flags
PatternSyntaxException - if the expression's syntax is invalid| Method Detail |
|---|
public static ValueConverter<String> regex(String pattern)
pattern - the regular expression pattern
PatternSyntaxException - if the expression's syntax is invalidpublic String convert(String value)
ValueConverter
convert in interface ValueConverter<String>value - the string to convert
public Class<String> valueType()
ValueConverter
valueType in interface ValueConverter<String>public String valuePattern()
ValueConverterdate format string.
valuePattern in interface ValueConverter<String>null if there's nothing interesting here
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||