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. TheparseArguments
function performs this functionality by receiving the array of arguments and the location of the cursor. WhenparseArguments
returnsargs.length
, this implies that all arguments have been processed.- Author:
- senseneyj
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
parseArguments(java.lang.String[] args, int initArg)
TheparseArguments
method parses command line arguments.
-
-
-
Method Detail
-
parseArguments
int parseArguments(java.lang.String[] args, int initArg)
TheparseArguments
method parses command line arguments. An internal cursor can be used to track the next argument to be processed. The purpose ofinitArg
is 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
-
-