|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!-- NewPage -->
- <html lang="de">
- <head>
- <!-- Generated by javadoc -->
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>CommandLine (Apache Commons CLI 1.4 API)</title>
- <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
- <script type="text/javascript" src="../../../../script.js"></script>
- </head>
- <body>
- <script type="text/javascript"><!--
- try {
- if (location.href.indexOf('is-external=true') == -1) {
- parent.document.title="CommandLine (Apache Commons CLI 1.4 API)";
- }
- }
- catch(err) {
- }
- //-->
- var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":42,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10};
- var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
- var altColor = "altColor";
- var rowColor = "rowColor";
- var tableTab = "tableTab";
- var activeTableTab = "activeTableTab";
- </script>
- <noscript>
- <div>JavaScript is disabled on your browser.</div>
- </noscript>
- <!-- ========= START OF TOP NAVBAR ======= -->
- <div class="topNav"><a name="navbar.top">
- <!-- -->
- </a>
- <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
- <a name="navbar.top.firstrow">
- <!-- -->
- </a>
- <ul class="navList" title="Navigation">
- <li><a href="../../../../org/apache/commons/cli/package-summary.html">Package</a></li>
- <li class="navBarCell1Rev">Class</li>
- <li><a href="class-use/CommandLine.html">Use</a></li>
- <li><a href="package-tree.html">Tree</a></li>
- <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
- <li><a href="../../../../index-all.html">Index</a></li>
- <li><a href="../../../../help-doc.html">Help</a></li>
- </ul>
- </div>
- <div class="subNav">
- <ul class="navList">
- <li><a href="../../../../org/apache/commons/cli/BasicParser.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../../../../org/apache/commons/cli/CommandLine.Builder.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../../../../index.html?org/apache/commons/cli/CommandLine.html" target="_top">Frames</a></li>
- <li><a href="CommandLine.html" target="_top">No Frames</a></li>
- </ul>
- <ul class="navList" id="allclasses_navbar_top">
- <li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
- </ul>
- <div>
- <script type="text/javascript"><!--
- allClassesLink = document.getElementById("allclasses_navbar_top");
- if(window==top) {
- allClassesLink.style.display = "block";
- }
- else {
- allClassesLink.style.display = "none";
- }
- //-->
- </script>
- </div>
- <div>
- <ul class="subNavList">
- <li>Summary: </li>
- <li><a href="#nested.class.summary">Nested</a> | </li>
- <li>Field | </li>
- <li><a href="#constructor.summary">Constr</a> | </li>
- <li><a href="#method.summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li>Field | </li>
- <li><a href="#constructor.detail">Constr</a> | </li>
- <li><a href="#method.detail">Method</a></li>
- </ul>
- </div>
- <a name="skip.navbar.top">
- <!-- -->
- </a></div>
- <!-- ========= END OF TOP NAVBAR ========= -->
- <!-- ======== START OF CLASS DATA ======== -->
- <div class="header">
- <div class="subTitle">org.apache.commons.cli</div>
- <h2 title="Class CommandLine" class="title">Class CommandLine</h2>
- </div>
- <div class="contentContainer">
- <ul class="inheritance">
- <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
- <li>
- <ul class="inheritance">
- <li>org.apache.commons.cli.CommandLine</li>
- </ul>
- </li>
- </ul>
- <div class="description">
- <ul class="blockList">
- <li class="blockList">
- <dl>
- <dt>All Implemented Interfaces:</dt>
- <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd>
- </dl>
- <hr>
- <br>
- <pre>public class <span class="typeNameLabel">CommandLine</span>
- extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
- implements <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
- <div class="block">Represents list of arguments parsed against a <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a> descriptor.
- <p>
- It allows querying of a boolean <a href="../../../../org/apache/commons/cli/CommandLine.html#hasOption-java.lang.String-"><code>hasOption(String opt)</code></a>,
- in addition to retrieving the <a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValue-java.lang.String-"><code>getOptionValue(String opt)</code></a>
- for options requiring arguments.
- <p>
- Additionally, any left-over or unrecognized arguments,
- are available for further processing.</div>
- <dl>
- <dt><span class="simpleTagLabel">Version:</span></dt>
- <dd>$Id: CommandLine.java 1786144 2017-03-09 11:34:57Z britter $</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../../../serialized-form.html#org.apache.commons.cli.CommandLine">Serialized Form</a></dd>
- </dl>
- </li>
- </ul>
- </div>
- <div class="summary">
- <ul class="blockList">
- <li class="blockList">
- <!-- ======== NESTED CLASS SUMMARY ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="nested.class.summary">
- <!-- -->
- </a>
- <h3>Nested Class Summary</h3>
- <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
- <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
- <tr>
- <th class="colFirst" scope="col">Modifier and Type</th>
- <th class="colLast" scope="col">Class and Description</th>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>static class </code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.Builder.html" title="class in org.apache.commons.cli">CommandLine.Builder</a></span></code>
- <div class="block">A nested builder class to create <code>CommandLine</code> instance
- using descriptive methods.</div>
- </td>
- </tr>
- </table>
- </li>
- </ul>
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="constructor.summary">
- <!-- -->
- </a>
- <h3>Constructor Summary</h3>
- <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
- <caption><span>Constructors</span><span class="tabEnd"> </span></caption>
- <tr>
- <th class="colFirst" scope="col">Modifier</th>
- <th class="colLast" scope="col">Constructor and Description</th>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>protected </code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#CommandLine--">CommandLine</a></span>()</code>
- <div class="block">Creates a command line.</div>
- </td>
- </tr>
- </table>
- </li>
- </ul>
- <!-- ========== METHOD SUMMARY =========== -->
- <ul class="blockList">
- <li class="blockList"><a name="method.summary">
- <!-- -->
- </a>
- <h3>Method Summary</h3>
- <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
- <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption>
- <tr>
- <th class="colFirst" scope="col">Modifier and Type</th>
- <th class="colLast" scope="col">Method and Description</th>
- </tr>
- <tr id="i0" class="altColor">
- <td class="colFirst"><code>protected void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#addArg-java.lang.String-">addArg</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> arg)</code>
- <div class="block">Add left-over unrecognized option/argument.</div>
- </td>
- </tr>
- <tr id="i1" class="rowColor">
- <td class="colFirst"><code>protected void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#addOption-org.apache.commons.cli.Option-">addOption</a></span>(<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a> opt)</code>
- <div class="block">Add an option to the command line.</div>
- </td>
- </tr>
- <tr id="i2" class="altColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getArgList--">getArgList</a></span>()</code>
- <div class="block">Retrieve any left-over non-recognized options and arguments</div>
- </td>
- </tr>
- <tr id="i3" class="rowColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getArgs--">getArgs</a></span>()</code>
- <div class="block">Retrieve any left-over non-recognized options and arguments</div>
- </td>
- </tr>
- <tr id="i4" class="altColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionObject-char-">getOptionObject</a></span>(char opt)</code>
- <div class="block">Return the <code>Object</code> type of this <code>Option</code>.</div>
- </td>
- </tr>
- <tr id="i5" class="rowColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionObject-java.lang.String-">getOptionObject</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)</code>
- <div class="block"><span class="deprecatedLabel">Deprecated.</span>
- <div class="block"><span class="deprecationComment">due to System.err message. Instead use getParsedOptionValue(String)</span></div>
- </div>
- </td>
- </tr>
- <tr id="i6" class="altColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionProperties-java.lang.String-">getOptionProperties</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)</code>
- <div class="block">Retrieve the map of values associated to the option.</div>
- </td>
- </tr>
- <tr id="i7" class="rowColor">
- <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>[]</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptions--">getOptions</a></span>()</code>
- <div class="block">Returns an array of the processed <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a>s.</div>
- </td>
- </tr>
- <tr id="i8" class="altColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValue-char-">getOptionValue</a></span>(char opt)</code>
- <div class="block">Retrieve the first argument, if any, of this option.</div>
- </td>
- </tr>
- <tr id="i9" class="rowColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValue-char-java.lang.String-">getOptionValue</a></span>(char opt,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> defaultValue)</code>
- <div class="block">Retrieve the argument, if any, of an option.</div>
- </td>
- </tr>
- <tr id="i10" class="altColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValue-java.lang.String-">getOptionValue</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)</code>
- <div class="block">Retrieve the first argument, if any, of this option.</div>
- </td>
- </tr>
- <tr id="i11" class="rowColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValue-java.lang.String-java.lang.String-">getOptionValue</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> defaultValue)</code>
- <div class="block">Retrieve the first argument, if any, of an option.</div>
- </td>
- </tr>
- <tr id="i12" class="altColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValues-char-">getOptionValues</a></span>(char opt)</code>
- <div class="block">Retrieves the array of values, if any, of an option.</div>
- </td>
- </tr>
- <tr id="i13" class="rowColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValues-java.lang.String-">getOptionValues</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)</code>
- <div class="block">Retrieves the array of values, if any, of an option.</div>
- </td>
- </tr>
- <tr id="i14" class="altColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getParsedOptionValue-java.lang.String-">getParsedOptionValue</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)</code>
- <div class="block">Return a version of this <code>Option</code> converted to a particular type.</div>
- </td>
- </tr>
- <tr id="i15" class="rowColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#hasOption-char-">hasOption</a></span>(char opt)</code>
- <div class="block">Query to see if an option has been set.</div>
- </td>
- </tr>
- <tr id="i16" class="altColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#hasOption-java.lang.String-">hasOption</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)</code>
- <div class="block">Query to see if an option has been set.</div>
- </td>
- </tr>
- <tr id="i17" class="rowColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#iterator--">iterator</a></span>()</code>
- <div class="block">Returns an iterator over the Option members of CommandLine.</div>
- </td>
- </tr>
- </table>
- <ul class="blockList">
- <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
- <!-- -->
- </a>
- <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
- <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- <div class="details">
- <ul class="blockList">
- <li class="blockList">
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="constructor.detail">
- <!-- -->
- </a>
- <h3>Constructor Detail</h3>
- <a name="CommandLine--">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>CommandLine</h4>
- <pre>protected CommandLine()</pre>
- <div class="block">Creates a command line.</div>
- </li>
- </ul>
- </li>
- </ul>
- <!-- ============ METHOD DETAIL ========== -->
- <ul class="blockList">
- <li class="blockList"><a name="method.detail">
- <!-- -->
- </a>
- <h3>Method Detail</h3>
- <a name="hasOption-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hasOption</h4>
- <pre>public boolean hasOption(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)</pre>
- <div class="block">Query to see if an option has been set.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - Short name of the option</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>true if set, false if not</dd>
- </dl>
- </li>
- </ul>
- <a name="hasOption-char-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hasOption</h4>
- <pre>public boolean hasOption(char opt)</pre>
- <div class="block">Query to see if an option has been set.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - character name of the option</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>true if set, false if not</dd>
- </dl>
- </li>
- </ul>
- <a name="getOptionObject-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getOptionObject</h4>
- <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
- public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> getOptionObject(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)</pre>
- <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">due to System.err message. Instead use getParsedOptionValue(String)</span></div>
- <div class="block">Return the <code>Object</code> type of this <code>Option</code>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - the name of the option</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the type of this <code>Option</code></dd>
- </dl>
- </li>
- </ul>
- <a name="getParsedOptionValue-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getParsedOptionValue</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> getParsedOptionValue(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)
- throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
- <div class="block">Return a version of this <code>Option</code> converted to a particular type.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - the name of the option</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the value parsed into a particular object</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if there are problems turning the option value into the desired type</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.2</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../../../org/apache/commons/cli/PatternOptionBuilder.html" title="class in org.apache.commons.cli"><code>PatternOptionBuilder</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="getOptionObject-char-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getOptionObject</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> getOptionObject(char opt)</pre>
- <div class="block">Return the <code>Object</code> type of this <code>Option</code>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - the name of the option</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the type of opt</dd>
- </dl>
- </li>
- </ul>
- <a name="getOptionValue-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getOptionValue</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getOptionValue(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)</pre>
- <div class="block">Retrieve the first argument, if any, of this option.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - the name of the option</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>Value of the argument if option is set, and has an argument,
- otherwise null.</dd>
- </dl>
- </li>
- </ul>
- <a name="getOptionValue-char-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getOptionValue</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getOptionValue(char opt)</pre>
- <div class="block">Retrieve the first argument, if any, of this option.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - the character name of the option</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>Value of the argument if option is set, and has an argument,
- otherwise null.</dd>
- </dl>
- </li>
- </ul>
- <a name="getOptionValues-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getOptionValues</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] getOptionValues(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)</pre>
- <div class="block">Retrieves the array of values, if any, of an option.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - string name of the option</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>Values of the argument if option is set, and has an argument,
- otherwise null.</dd>
- </dl>
- </li>
- </ul>
- <a name="getOptionValues-char-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getOptionValues</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] getOptionValues(char opt)</pre>
- <div class="block">Retrieves the array of values, if any, of an option.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - character name of the option</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>Values of the argument if option is set, and has an argument,
- otherwise null.</dd>
- </dl>
- </li>
- </ul>
- <a name="getOptionValue-java.lang.String-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getOptionValue</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getOptionValue(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> defaultValue)</pre>
- <div class="block">Retrieve the first argument, if any, of an option.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - name of the option</dd>
- <dd><code>defaultValue</code> - is the default value to be returned if the option
- is not specified</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>Value of the argument if option is set, and has an argument,
- otherwise <code>defaultValue</code>.</dd>
- </dl>
- </li>
- </ul>
- <a name="getOptionValue-char-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getOptionValue</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getOptionValue(char opt,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> defaultValue)</pre>
- <div class="block">Retrieve the argument, if any, of an option.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - character name of the option</dd>
- <dd><code>defaultValue</code> - is the default value to be returned if the option
- is not specified</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>Value of the argument if option is set, and has an argument,
- otherwise <code>defaultValue</code>.</dd>
- </dl>
- </li>
- </ul>
- <a name="getOptionProperties-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getOptionProperties</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> getOptionProperties(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> opt)</pre>
- <div class="block">Retrieve the map of values associated to the option. This is convenient
- for options specifying Java properties like <tt>-Dparam1=value1
- -Dparam2=value2</tt>. The first argument of the option is the key, and
- the 2nd argument is the value. If the option has only one argument
- (<tt>-Dfoo</tt>) it is considered as a boolean flag and the value is
- <tt>"true"</tt>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - name of the option</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>The Properties mapped by the option, never <tt>null</tt>
- even if the option doesn't exists</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.2</dd>
- </dl>
- </li>
- </ul>
- <a name="getArgs--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getArgs</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] getArgs()</pre>
- <div class="block">Retrieve any left-over non-recognized options and arguments</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>remaining items passed in but not parsed as an array</dd>
- </dl>
- </li>
- </ul>
- <a name="getArgList--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getArgList</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getArgList()</pre>
- <div class="block">Retrieve any left-over non-recognized options and arguments</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>remaining items passed in but not parsed as a <code>List</code>.</dd>
- </dl>
- </li>
- </ul>
- <a name="addArg-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>addArg</h4>
- <pre>protected void addArg(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> arg)</pre>
- <div class="block">Add left-over unrecognized option/argument.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>arg</code> - the unrecognized option/argument.</dd>
- </dl>
- </li>
- </ul>
- <a name="addOption-org.apache.commons.cli.Option-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>addOption</h4>
- <pre>protected void addOption(<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a> opt)</pre>
- <div class="block">Add an option to the command line. The values of the option are stored.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - the processed option</dd>
- </dl>
- </li>
- </ul>
- <a name="iterator--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>iterator</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>> iterator()</pre>
- <div class="block">Returns an iterator over the Option members of CommandLine.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>an <code>Iterator</code> over the processed <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a>
- members of this <a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli"><code>CommandLine</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="getOptions--">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>getOptions</h4>
- <pre>public <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>[] getOptions()</pre>
- <div class="block">Returns an array of the processed <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a>s.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>an array of the processed <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a>s.</dd>
- </dl>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- <!-- ========= END OF CLASS DATA ========= -->
- <!-- ======= START OF BOTTOM NAVBAR ====== -->
- <div class="bottomNav"><a name="navbar.bottom">
- <!-- -->
- </a>
- <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
- <a name="navbar.bottom.firstrow">
- <!-- -->
- </a>
- <ul class="navList" title="Navigation">
- <li><a href="../../../../org/apache/commons/cli/package-summary.html">Package</a></li>
- <li class="navBarCell1Rev">Class</li>
- <li><a href="class-use/CommandLine.html">Use</a></li>
- <li><a href="package-tree.html">Tree</a></li>
- <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
- <li><a href="../../../../index-all.html">Index</a></li>
- <li><a href="../../../../help-doc.html">Help</a></li>
- </ul>
- </div>
- <div class="subNav">
- <ul class="navList">
- <li><a href="../../../../org/apache/commons/cli/BasicParser.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../../../../org/apache/commons/cli/CommandLine.Builder.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../../../../index.html?org/apache/commons/cli/CommandLine.html" target="_top">Frames</a></li>
- <li><a href="CommandLine.html" target="_top">No Frames</a></li>
- </ul>
- <ul class="navList" id="allclasses_navbar_bottom">
- <li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
- </ul>
- <div>
- <script type="text/javascript"><!--
- allClassesLink = document.getElementById("allclasses_navbar_bottom");
- if(window==top) {
- allClassesLink.style.display = "block";
- }
- else {
- allClassesLink.style.display = "none";
- }
- //-->
- </script>
- </div>
- <div>
- <ul class="subNavList">
- <li>Summary: </li>
- <li><a href="#nested.class.summary">Nested</a> | </li>
- <li>Field | </li>
- <li><a href="#constructor.summary">Constr</a> | </li>
- <li><a href="#method.summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li>Field | </li>
- <li><a href="#constructor.detail">Constr</a> | </li>
- <li><a href="#method.detail">Method</a></li>
- </ul>
- </div>
- <a name="skip.navbar.bottom">
- <!-- -->
- </a></div>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
- <p class="legalCopy"><small>Copyright © 2002–2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
- </body>
- </html>
|