Package gov.nih.mipav.view
Interface CommandLineParser
- All Known Implementing Classes:
ViewUserInterface
public interface CommandLineParser
A MIPAV command line parser reads the arguments provided to MIPAV at the command line. The parser
is expected to keep an internal cursor to represent the location of the next argument to be parsed.
The
parseArguments function performs this functionality by receiving the array of arguments
and the location of the cursor. When parseArguments returns args.length, this implies that
all arguments have been processed.- Author:
- senseneyj
-
Method Summary
Modifier and TypeMethodDescriptionintparseArguments(String[] args, int initArg) TheparseArgumentsmethod parses command line arguments.
-
Method Details
-
parseArguments
TheparseArgumentsmethod parses command line arguments. An internal cursor can be used to track the next argument to be processed. The purpose ofinitArgis to tell this method which argument to start processing. This method returns the location of the next argument to be processed. If this method returns an integer equal toargs.length, then it is implied that all arguments have been processed. Note that the cursor does not necessarily need to return a value greater thaninitArg.- Parameters:
args- command argumentsinitArgs- the location of the next command to be processed- Returns:
- the location of the next command to be processed, if equal to args.length, then no further processing is necessary
-