io.args
Class ArgumentChecker
java.lang.Object
io.args.ArgumentChecker
- public class ArgumentChecker
- extends java.lang.Object
Perform consistency checks on the argument list.
- does it contain the minimum number of entries?
- does it contain no more than the maximum number of entries?
- do all entries match a given regular expression?
- Version:
- 0.1, february 2005
- Author:
- Vincent Kraeutler
- See Also:
ArgumentValueSpec,
ArgumentParser
|
Method Summary |
static void |
check(java.lang.String argName,
java.util.ArrayList argValues,
int min,
int max,
java.lang.String regx)
assert that argValues has the right (min < x < max) number of arguments, and that all arguments match regex. |
static void |
checkPattern(java.lang.String argumentName,
java.lang.String argument,
java.lang.String regex)
assert that argument matches regex. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
noBound
public static final int noBound
- See Also:
- Constant Field Values
noPattern
public static final java.lang.String noPattern
fileNamePattern
public static final java.lang.String fileNamePattern
blockNamePattern
public static final java.lang.String blockNamePattern
- See Also:
- Constant Field Values
capitalsPattern
public static final java.lang.String capitalsPattern
- See Also:
- Constant Field Values
pbcPattern
public static final java.lang.String pbcPattern
- See Also:
- Constant Field Values
gatherPattern
public static final java.lang.String gatherPattern
- See Also:
- Constant Field Values
yesNoPattern
public static final java.lang.String yesNoPattern
- See Also:
- Constant Field Values
pbcGatherPattern
public static final java.lang.String pbcGatherPattern
- See Also:
- Constant Field Values
integerPattern
public static final java.lang.String integerPattern
- See Also:
- Constant Field Values
floatPattern
public static final java.lang.String floatPattern
- See Also:
- Constant Field Values
ArgumentChecker
public ArgumentChecker()
checkPattern
public static void checkPattern(java.lang.String argumentName,
java.lang.String argument,
java.lang.String regex)
throws java.io.IOException
- assert that argument matches regex.
- Parameters:
argumentName - argument - regex -
- Throws:
java.io.IOException
check
public static void check(java.lang.String argName,
java.util.ArrayList argValues,
int min,
int max,
java.lang.String regx)
throws java.io.IOException
- assert that argValues has the right (min < x < max) number of arguments, and that all arguments match regex.
- Parameters:
argName - argValues - min - max - regx -
- Throws:
java.io.IOException