Chapter 7. Flagged Options

A FlaggedOption is a value preceded by either a long or short flag indicating the value's meaning (see the example in Chapter 2). The FlaggedOption class provides a setAllowMultipleDeclarations(boolean) method that informs JSAP whether the FlaggedOption may be repeated on the command line. For example, if your program uses a FlaggedOption to specify an input file (say, "-i file"), multiple declarations will allow your users to enter "-i file1 -i file2 -i file3 ...". The multiple values can be accessed through JSAPResult's getXXXArray() methods.