org.forester.util
Class CommandLineArguments
java.lang.Object
org.forester.util.CommandLineArguments
public final 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)
throws IOException
- Throws:
IOException
getCommandLineArgsAsString
public String getCommandLineArgsAsString()
getFile
public File getFile(int i)
getName
public String getName(int i)
getNames
public String[] getNames()
getNumberOfNames
public int getNumberOfNames()
getOptionValue
public String getOptionValue(String option_name)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getOptionValueAsCleanString
public String getOptionValueAsCleanString(String option_name)
throws IllegalArgumentException
- Removes quotes
- Throws:
IllegalArgumentException
getOptionValueAsDouble
public double getOptionValueAsDouble(String option_name)
throws IOException
- Throws:
IOException
getOptionValueAsInt
public int getOptionValueAsInt(String option_name)
throws IOException
- Throws:
IOException
getOptionValueAsLong
public long getOptionValueAsLong(String option_name)
throws IOException
- Throws:
IOException
isOptionHasAValue
public boolean isOptionHasAValue(String option_name)
isOptionSet
public boolean isOptionSet(String option_name)
isOptionValueSet
public boolean isOptionValueSet(String option_name)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
validateAllowedOptions
public List<String> validateAllowedOptions(List<String> allowed_options)
validateAllowedOptionsAsString
public String validateAllowedOptionsAsString(List<String> allowed_options)
validateMandatoryOptions
public List<String> validateMandatoryOptions(List<String> mandatory_options)
validateMandatoryOptionsAsString
public String validateMandatoryOptionsAsString(List<String> mandatory_options)