|
||||||||||
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(java.lang.String pattern,
int flags)
Creates a matcher that uses the given regular expression, modified by the given flags. |
Method Summary | |
---|---|
java.lang.String |
convert(java.lang.String value)
Converts the given string value into a Java type. |
static ValueConverter<java.lang.String> |
regex(java.lang.String pattern)
Gives a matcher that uses the given regular expression. |
java.lang.String |
valuePattern()
Gives a string that describes the pattern of the values this converter expects, if any. |
java.lang.Class<java.lang.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(java.lang.String pattern, int flags)
pattern
- the regular expression patternflags
- modifying regex flags
java.lang.IllegalArgumentException
- if bit values other than those corresponding to
the defined match flags are set in flags
java.util.regex.PatternSyntaxException
- if the expression's syntax is
invalidMethod Detail |
---|
public static ValueConverter<java.lang.String> regex(java.lang.String pattern)
pattern
- the regular expression pattern
java.util.regex.PatternSyntaxException
- if the expression's syntax is
invalidpublic java.lang.String convert(java.lang.String value)
convert
in interface ValueConverter<java.lang.String>
value
- the string to convert
public java.lang.Class<java.lang.String> valueType()
valueType
in interface ValueConverter<java.lang.String>
public java.lang.String valuePattern()
date format string
.
valuePattern
in interface ValueConverter<java.lang.String>
null
if there's nothing interesting here
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |