4545 </subsection >
4646 <subsection name =" Create the Options" >
4747 <p >
48- An <a href =" api-1.2 /org/apache/commons/cli/Options.html" >
48+ An <a href =" api-release /org/apache/commons/cli/Options.html" >
4949 Options</a > object must be created and the <code >Option</code > must be
5050 added to it.
5151 </p >
@@ -78,7 +78,7 @@ CommandLine cmd = parser.parse( options, args);</source>
7878 <p >
7979 Now we need to check if the <code >t</code > option is present. To do
8080 this we will interrogate the
81- <a href =" api-1.2 /org/apache/commons/cli/CommandLine.html" >CommandLine
81+ <a href =" api-release /org/apache/commons/cli/CommandLine.html" >CommandLine
8282 </a > object. The <code >hasOption</code > method takes a
8383 <code >java.lang.String</code > parameter and returns <code >true</code > if the option
8484 represented by the <code >java.lang.String</code > is present, otherwise
@@ -212,11 +212,11 @@ Option find = OptionBuilder.withArgName( "file" )
212212 <subsection name =" Create the Options" >
213213 <p >
214214 Now that we have created each
215- <a href =" api-1.2 /org/apache/commons/cli/Option.html" >Option</a > we need
215+ <a href =" api-release /org/apache/commons/cli/Option.html" >Option</a > we need
216216 to create the
217- <a href =" api-1.2 /org/apache/commons/cli/Options.html" >Options</a >
217+ <a href =" api-release /org/apache/commons/cli/Options.html" >Options</a >
218218 instance. This is achieved using the
219- <a href =" api-1.2 /org/apache/commons/cli/CommandLine.html#addOption(org.apache.commons.cli.Option)" >addOption</a >
219+ <a href =" api-release /org/apache/commons/cli/CommandLine.html#addOption(org.apache.commons.cli.Option)" >addOption</a >
220220 method of <code >Options</code >.
221221 </p >
222222 <source >Options options = new Options();
@@ -243,7 +243,7 @@ options.addOption( property );</source>
243243 <p >
244244 We now need to create a <code >CommandLineParser</code >. This will parse the command
245245 line arguments, using the rules specified by the <code >Options</code > and
246- return an instance of <a href =" api-1.2 /org/apache/commons/cli/CommandLine.html" >CommandLine</a >.
246+ return an instance of <a href =" api-release /org/apache/commons/cli/CommandLine.html" >CommandLine</a >.
247247 </p >
248248 <source >public static void main( String[] args ) {
249249 // create the parser
@@ -274,7 +274,7 @@ if( line.hasOption( "buildfile" ) ) {
274274 <p >
275275 CLI also provides the means to automatically generate usage
276276 and help information. This is achieved with the
277- <a href =" api-1.2 /org/apache/commons/cli/HelpFormatter.html" >HelpFormatter</a >
277+ <a href =" api-release /org/apache/commons/cli/HelpFormatter.html" >HelpFormatter</a >
278278 class.
279279 </p >
280280 <source >// automatically generate the help statement
@@ -328,7 +328,7 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.
328328-C list entries by columns</source >
329329 <p >
330330 The following is the code that is used to create the
331- <a href =" api-1.2 /org/apache/commons/cli/Options.html" >Options</a > for this example.
331+ <a href =" api-release /org/apache/commons/cli/Options.html" >Options</a > for this example.
332332 </p >
333333 <source >// create the command line parser
334334CommandLineParser parser = new DefaultParser();
0 commit comments