userinterface.cmdline
Class CommandLineArguments
java.lang.Object
userinterface.cmdline.CommandLineArguments
public class CommandLineArguments
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandLineArguments
public CommandLineArguments(String[] args,
String... allowed)
throws InvalidArgumentsException
- Throws:
InvalidArgumentsException
CommandLineArguments
public CommandLineArguments(String[] args,
boolean allowList,
String[] switches,
String[] allowed)
throws InvalidArgumentsException
- Throws:
InvalidArgumentsException
isSet
public boolean isSet(String switchName)
hasValue
public boolean hasValue(String switchName)
getValue
public String getValue(String key)
requireValue
public String requireValue(String key,
String errMsg)
avoidSwitch
public void avoidSwitch(String key,
String errMsg)
checkNumericArguments
public void checkNumericArguments(String... names)
throws InvalidArgumentsException
- Throws:
InvalidArgumentsException
checkIntegerArguments
public void checkIntegerArguments(String... names)
throws InvalidArgumentsException
- Throws:
InvalidArgumentsException
getFreeArguments
public List<String> getFreeArguments()