|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237 |
- <!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>Option (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="Option (Apache Commons CLI 1.4 API)";
- }
- }
- catch(err) {
- }
- //-->
- var methods = {"i0":42,"i1":9,"i2":9,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":42,"i34":10,"i35":10};
- var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/Option.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/MissingOptionException.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../../../../org/apache/commons/cli/Option.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/Option.html" target="_top">Frames</a></li>
- <li><a href="Option.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><a href="#field.summary">Field</a> | </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><a href="#field.detail">Field</a> | </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 Option" class="title">Class Option</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.Option</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>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a></dd>
- </dl>
- <hr>
- <br>
- <pre>public class <span class="typeNameLabel">Option</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/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a>, <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">Describes a single command-line option. It maintains
- information regarding the short-name of the option, the long-name,
- if any exists, a flag indicating if an argument is required for
- this option, and a self-documenting description of the option.
- <p>
- An Option is not created independently, but is created through
- an instance of <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>. An Option is required to have
- at least a short or a long-name.
- <p>
- <b>Note:</b> once an <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> has been added to an instance
- of <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>, it's required flag may not be changed anymore.</div>
- <dl>
- <dt><span class="simpleTagLabel">Version:</span></dt>
- <dd>$Id: Option.java 1756753 2016-08-18 10:18:43Z britter $</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>,
- <a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli"><code>CommandLine</code></a>,
- <a href="../../../../serialized-form.html#org.apache.commons.cli.Option">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/Option.Builder.html" title="class in org.apache.commons.cli">Option.Builder</a></span></code>
- <div class="block">A nested builder class to create <code>Option</code> instances
- using descriptive methods.</div>
- </td>
- </tr>
- </table>
- </li>
- </ul>
- <!-- =========== FIELD SUMMARY =========== -->
- <ul class="blockList">
- <li class="blockList"><a name="field.summary">
- <!-- -->
- </a>
- <h3>Field Summary</h3>
- <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
- <caption><span>Fields</span><span class="tabEnd"> </span></caption>
- <tr>
- <th class="colFirst" scope="col">Modifier and Type</th>
- <th class="colLast" scope="col">Field and Description</th>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>static int</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#UNINITIALIZED">UNINITIALIZED</a></span></code>
- <div class="block">constant that specifies the number of argument values has not been specified</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>static int</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#UNLIMITED_VALUES">UNLIMITED_VALUES</a></span></code>
- <div class="block">constant that specifies the number of argument values is infinite</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="colOne" scope="col">Constructor and Description</th>
- </tr>
- <tr class="altColor">
- <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#Option-java.lang.String-boolean-java.lang.String-">Option</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,
- boolean hasArg,
- <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> description)</code>
- <div class="block">Creates an Option using the specified parameters.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#Option-java.lang.String-java.lang.String-">Option</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> description)</code>
- <div class="block">Creates an Option using the specified parameters.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#Option-java.lang.String-java.lang.String-boolean-java.lang.String-">Option</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> longOpt,
- boolean hasArg,
- <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> description)</code>
- <div class="block">Creates an Option using the specified parameters.</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="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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>boolean</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#addValue-java.lang.String-">addValue</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> value)</code>
- <div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
- </td>
- </tr>
- <tr id="i1" class="rowColor">
- <td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli">Option.Builder</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#builder--">builder</a></span>()</code>
- <div class="block">Returns a <a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli"><code>Option.Builder</code></a> to create an <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> using descriptive
- methods.</div>
- </td>
- </tr>
- <tr id="i2" class="altColor">
- <td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli">Option.Builder</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#builder-java.lang.String-">builder</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">Returns a <a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli"><code>Option.Builder</code></a> to create an <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> using descriptive
- methods.</div>
- </td>
- </tr>
- <tr id="i3" 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/Option.html#clone--">clone</a></span>()</code>
- <div class="block">A rather odd clone method - due to incorrect code in 1.0 it is public
- and in 1.1 rather than throwing a CloneNotSupportedException it throws
- a RuntimeException so as to maintain backwards compat at the API level.</div>
- </td>
- </tr>
- <tr id="i4" class="altColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#equals-java.lang.Object-">equals</a></span>(<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> o)</code> </td>
- </tr>
- <tr id="i5" 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/Option.html#getArgName--">getArgName</a></span>()</code>
- <div class="block">Gets the display name for the argument value.</div>
- </td>
- </tr>
- <tr id="i6" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#getArgs--">getArgs</a></span>()</code>
- <div class="block">Returns the number of argument values this Option can take.</div>
- </td>
- </tr>
- <tr id="i7" 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/Option.html#getDescription--">getDescription</a></span>()</code>
- <div class="block">Retrieve the self-documenting description of this Option</div>
- </td>
- </tr>
- <tr id="i8" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#getId--">getId</a></span>()</code>
- <div class="block">Returns the id 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/Option.html#getLongOpt--">getLongOpt</a></span>()</code>
- <div class="block">Retrieve the long name of this 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/Option.html#getOpt--">getOpt</a></span>()</code>
- <div class="block">Retrieve the name 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/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/Option.html#getType--">getType</a></span>()</code>
- <div class="block">Retrieve the type of this 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/Option.html#getValue--">getValue</a></span>()</code>
- <div class="block">Returns the specified value of this Option or
- <code>null</code> if there is no value.</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/Option.html#getValue-int-">getValue</a></span>(int index)</code>
- <div class="block">Returns the specified value of this Option or
- <code>null</code> if there is no value.</div>
- </td>
- </tr>
- <tr id="i14" 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/Option.html#getValue-java.lang.String-">getValue</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> defaultValue)</code>
- <div class="block">Returns the value/first value of this Option or the
- <code>defaultValue</code> if there is no value.</div>
- </td>
- </tr>
- <tr id="i15" 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/Option.html#getValues--">getValues</a></span>()</code>
- <div class="block">Return the values of this Option as a String array
- or null if there are no values</div>
- </td>
- </tr>
- <tr id="i16" class="altColor">
- <td class="colFirst"><code>char</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#getValueSeparator--">getValueSeparator</a></span>()</code>
- <div class="block">Returns the value separator character.</div>
- </td>
- </tr>
- <tr id="i17" class="rowColor">
- <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/Option.html#getValuesList--">getValuesList</a></span>()</code> </td>
- </tr>
- <tr id="i18" class="altColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#hasArg--">hasArg</a></span>()</code>
- <div class="block">Query to see if this Option requires an argument</div>
- </td>
- </tr>
- <tr id="i19" class="rowColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#hasArgName--">hasArgName</a></span>()</code>
- <div class="block">Returns whether the display name for the argument value has been set.</div>
- </td>
- </tr>
- <tr id="i20" class="altColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#hasArgs--">hasArgs</a></span>()</code>
- <div class="block">Query to see if this Option can take many values.</div>
- </td>
- </tr>
- <tr id="i21" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#hashCode--">hashCode</a></span>()</code> </td>
- </tr>
- <tr id="i22" class="altColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#hasLongOpt--">hasLongOpt</a></span>()</code>
- <div class="block">Query to see if this Option has a long name</div>
- </td>
- </tr>
- <tr id="i23" class="rowColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#hasOptionalArg--">hasOptionalArg</a></span>()</code> </td>
- </tr>
- <tr id="i24" class="altColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#hasValueSeparator--">hasValueSeparator</a></span>()</code>
- <div class="block">Return whether this Option has specified a value separator.</div>
- </td>
- </tr>
- <tr id="i25" class="rowColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#isRequired--">isRequired</a></span>()</code>
- <div class="block">Query to see if this Option is mandatory</div>
- </td>
- </tr>
- <tr id="i26" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#setArgName-java.lang.String-">setArgName</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> argName)</code>
- <div class="block">Sets the display name for the argument value.</div>
- </td>
- </tr>
- <tr id="i27" class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#setArgs-int-">setArgs</a></span>(int num)</code>
- <div class="block">Sets the number of argument values this Option can take.</div>
- </td>
- </tr>
- <tr id="i28" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#setDescription-java.lang.String-">setDescription</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> description)</code>
- <div class="block">Sets the self-documenting description of this Option</div>
- </td>
- </tr>
- <tr id="i29" class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#setLongOpt-java.lang.String-">setLongOpt</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> longOpt)</code>
- <div class="block">Sets the long name of this Option.</div>
- </td>
- </tr>
- <tr id="i30" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#setOptionalArg-boolean-">setOptionalArg</a></span>(boolean optionalArg)</code>
- <div class="block">Sets whether this Option can have an optional argument.</div>
- </td>
- </tr>
- <tr id="i31" class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#setRequired-boolean-">setRequired</a></span>(boolean required)</code>
- <div class="block">Sets whether this Option is mandatory.</div>
- </td>
- </tr>
- <tr id="i32" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#setType-java.lang.Class-">setType</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> type)</code>
- <div class="block">Sets the type of this Option.</div>
- </td>
- </tr>
- <tr id="i33" class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#setType-java.lang.Object-">setType</a></span>(<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> type)</code>
- <div class="block"><span class="deprecatedLabel">Deprecated.</span>
- <div class="block"><span class="deprecationComment">since 1.3, use <a href="../../../../org/apache/commons/cli/Option.html#setType-java.lang.Class-"><code>setType(Class)</code></a> instead</span></div>
- </div>
- </td>
- </tr>
- <tr id="i34" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#setValueSeparator-char-">setValueSeparator</a></span>(char sep)</code>
- <div class="block">Sets the value separator.</div>
- </td>
- </tr>
- <tr id="i35" 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/Option.html#toString--">toString</a></span>()</code>
- <div class="block">Dump state, suitable for debugging.</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#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#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#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">
- <!-- ============ FIELD DETAIL =========== -->
- <ul class="blockList">
- <li class="blockList"><a name="field.detail">
- <!-- -->
- </a>
- <h3>Field Detail</h3>
- <a name="UNINITIALIZED">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>UNINITIALIZED</h4>
- <pre>public static final int UNINITIALIZED</pre>
- <div class="block">constant that specifies the number of argument values has not been specified</div>
- <dl>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../../../constant-values.html#org.apache.commons.cli.Option.UNINITIALIZED">Constant Field Values</a></dd>
- </dl>
- </li>
- </ul>
- <a name="UNLIMITED_VALUES">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>UNLIMITED_VALUES</h4>
- <pre>public static final int UNLIMITED_VALUES</pre>
- <div class="block">constant that specifies the number of argument values is infinite</div>
- <dl>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../../../constant-values.html#org.apache.commons.cli.Option.UNLIMITED_VALUES">Constant Field Values</a></dd>
- </dl>
- </li>
- </ul>
- </li>
- </ul>
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="constructor.detail">
- <!-- -->
- </a>
- <h3>Constructor Detail</h3>
- <a name="Option-java.lang.String-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>Option</h4>
- <pre>public Option(<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> description)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
- <div class="block">Creates an Option using the specified parameters.
- The option does not take an argument.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - short representation of the option</dd>
- <dd><code>description</code> - describes the function of the option</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if there are any non valid
- Option characters in <code>opt</code>.</dd>
- </dl>
- </li>
- </ul>
- <a name="Option-java.lang.String-boolean-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>Option</h4>
- <pre>public Option(<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,
- boolean hasArg,
- <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> description)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
- <div class="block">Creates an Option using the specified parameters.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - short representation of the option</dd>
- <dd><code>hasArg</code> - specifies whether the Option takes an argument or not</dd>
- <dd><code>description</code> - describes the function of the option</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if there are any non valid
- Option characters in <code>opt</code>.</dd>
- </dl>
- </li>
- </ul>
- <a name="Option-java.lang.String-java.lang.String-boolean-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>Option</h4>
- <pre>public Option(<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> longOpt,
- boolean hasArg,
- <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> description)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
- <div class="block">Creates an Option using the specified parameters.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - short representation of the option</dd>
- <dd><code>longOpt</code> - the long representation of the option</dd>
- <dd><code>hasArg</code> - specifies whether the Option takes an argument or not</dd>
- <dd><code>description</code> - describes the function of the option</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if there are any non valid
- Option characters in <code>opt</code>.</dd>
- </dl>
- </li>
- </ul>
- </li>
- </ul>
- <!-- ============ METHOD DETAIL ========== -->
- <ul class="blockList">
- <li class="blockList"><a name="method.detail">
- <!-- -->
- </a>
- <h3>Method Detail</h3>
- <a name="getId--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getId</h4>
- <pre>public int getId()</pre>
- <div class="block">Returns the id of this Option. This is only set when the
- Option shortOpt is a single character. This is used for switch
- statements.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the id of this Option</dd>
- </dl>
- </li>
- </ul>
- <a name="getOpt--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getOpt</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> getOpt()</pre>
- <div class="block">Retrieve the name of this Option.
-
- It is this String which can be used with
- <a href="../../../../org/apache/commons/cli/CommandLine.html#hasOption-java.lang.String-"><code>CommandLine.hasOption(String opt)</code></a> and
- <a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValue-java.lang.String-"><code>CommandLine.getOptionValue(String opt)</code></a> to check
- for existence and argument.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>The name of this option</dd>
- </dl>
- </li>
- </ul>
- <a name="getType--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getType</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> getType()</pre>
- <div class="block">Retrieve the type of this Option.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>The type of this option</dd>
- </dl>
- </li>
- </ul>
- <a name="setType-java.lang.Object-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setType</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 void setType(<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> type)</pre>
- <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">since 1.3, use <a href="../../../../org/apache/commons/cli/Option.html#setType-java.lang.Class-"><code>setType(Class)</code></a> instead</span></div>
- <div class="block">Sets the type of this Option.
- <p>
- <b>Note:</b> this method is kept for binary compatibility and the
- input type is supposed to be a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a> object.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>type</code> - the type of this Option</dd>
- </dl>
- </li>
- </ul>
- <a name="setType-java.lang.Class-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setType</h4>
- <pre>public void setType(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> type)</pre>
- <div class="block">Sets the type of this Option.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>type</code> - the type of this Option</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.3</dd>
- </dl>
- </li>
- </ul>
- <a name="getLongOpt--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getLongOpt</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> getLongOpt()</pre>
- <div class="block">Retrieve the long name of this Option.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>Long name of this option, or null, if there is no long name</dd>
- </dl>
- </li>
- </ul>
- <a name="setLongOpt-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setLongOpt</h4>
- <pre>public void setLongOpt(<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> longOpt)</pre>
- <div class="block">Sets the long name of this Option.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>longOpt</code> - the long name of this Option</dd>
- </dl>
- </li>
- </ul>
- <a name="setOptionalArg-boolean-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setOptionalArg</h4>
- <pre>public void setOptionalArg(boolean optionalArg)</pre>
- <div class="block">Sets whether this Option can have an optional argument.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>optionalArg</code> - specifies whether the Option can have
- an optional argument.</dd>
- </dl>
- </li>
- </ul>
- <a name="hasOptionalArg--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hasOptionalArg</h4>
- <pre>public boolean hasOptionalArg()</pre>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>whether this Option can have an optional argument</dd>
- </dl>
- </li>
- </ul>
- <a name="hasLongOpt--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hasLongOpt</h4>
- <pre>public boolean hasLongOpt()</pre>
- <div class="block">Query to see if this Option has a long name</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>boolean flag indicating existence of a long name</dd>
- </dl>
- </li>
- </ul>
- <a name="hasArg--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hasArg</h4>
- <pre>public boolean hasArg()</pre>
- <div class="block">Query to see if this Option requires an argument</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>boolean flag indicating if an argument is required</dd>
- </dl>
- </li>
- </ul>
- <a name="getDescription--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getDescription</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> getDescription()</pre>
- <div class="block">Retrieve the self-documenting description of this Option</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>The string description of this option</dd>
- </dl>
- </li>
- </ul>
- <a name="setDescription-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setDescription</h4>
- <pre>public void setDescription(<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> description)</pre>
- <div class="block">Sets the self-documenting description of this Option</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>description</code> - The description of this option</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.1</dd>
- </dl>
- </li>
- </ul>
- <a name="isRequired--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>isRequired</h4>
- <pre>public boolean isRequired()</pre>
- <div class="block">Query to see if this Option is mandatory</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>boolean flag indicating whether this Option is mandatory</dd>
- </dl>
- </li>
- </ul>
- <a name="setRequired-boolean-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setRequired</h4>
- <pre>public void setRequired(boolean required)</pre>
- <div class="block">Sets whether this Option is mandatory.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>required</code> - specifies whether this Option is mandatory</dd>
- </dl>
- </li>
- </ul>
- <a name="setArgName-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setArgName</h4>
- <pre>public void setArgName(<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> argName)</pre>
- <div class="block">Sets the display name for the argument value.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>argName</code> - the display name for the argument value.</dd>
- </dl>
- </li>
- </ul>
- <a name="getArgName--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getArgName</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> getArgName()</pre>
- <div class="block">Gets the display name for the argument value.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the display name for the argument value.</dd>
- </dl>
- </li>
- </ul>
- <a name="hasArgName--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hasArgName</h4>
- <pre>public boolean hasArgName()</pre>
- <div class="block">Returns whether the display name for the argument value has been set.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>if the display name for the argument value has been set.</dd>
- </dl>
- </li>
- </ul>
- <a name="hasArgs--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hasArgs</h4>
- <pre>public boolean hasArgs()</pre>
- <div class="block">Query to see if this Option can take many values.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>boolean flag indicating if multiple values are allowed</dd>
- </dl>
- </li>
- </ul>
- <a name="setArgs-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setArgs</h4>
- <pre>public void setArgs(int num)</pre>
- <div class="block">Sets the number of argument values this Option can take.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>num</code> - the number of argument values</dd>
- </dl>
- </li>
- </ul>
- <a name="setValueSeparator-char-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setValueSeparator</h4>
- <pre>public void setValueSeparator(char sep)</pre>
- <div class="block">Sets the value separator. For example if the argument value
- was a Java property, the value separator would be '='.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>sep</code> - The value separator.</dd>
- </dl>
- </li>
- </ul>
- <a name="getValueSeparator--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getValueSeparator</h4>
- <pre>public char getValueSeparator()</pre>
- <div class="block">Returns the value separator character.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the value separator character.</dd>
- </dl>
- </li>
- </ul>
- <a name="hasValueSeparator--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hasValueSeparator</h4>
- <pre>public boolean hasValueSeparator()</pre>
- <div class="block">Return whether this Option has specified a value separator.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>whether this Option has specified a value separator.</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.1</dd>
- </dl>
- </li>
- </ul>
- <a name="getArgs--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getArgs</h4>
- <pre>public int getArgs()</pre>
- <div class="block">Returns the number of argument values this Option can take.
-
- <p>
- A value equal to the constant <a href="../../../../org/apache/commons/cli/Option.html#UNINITIALIZED"><code>UNINITIALIZED</code></a> (= -1) indicates
- the number of arguments has not been specified.
- A value equal to the constant <a href="../../../../org/apache/commons/cli/Option.html#UNLIMITED_VALUES"><code>UNLIMITED_VALUES</code></a> (= -2) indicates
- that this options takes an unlimited amount of values.
- </p></div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>num the number of argument values</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../../../org/apache/commons/cli/Option.html#UNINITIALIZED"><code>UNINITIALIZED</code></a>,
- <a href="../../../../org/apache/commons/cli/Option.html#UNLIMITED_VALUES"><code>UNLIMITED_VALUES</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="getValue--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getValue</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> getValue()</pre>
- <div class="block">Returns the specified value of this Option or
- <code>null</code> if there is no value.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the value/first value of this Option or
- <code>null</code> if there is no value.</dd>
- </dl>
- </li>
- </ul>
- <a name="getValue-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getValue</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> getValue(int index)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></pre>
- <div class="block">Returns the specified value of this Option or
- <code>null</code> if there is no value.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>index</code> - The index of the value to be returned.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the specified value of this Option or
- <code>null</code> if there is no value.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - if index is less than 1
- or greater than the number of the values for this Option.</dd>
- </dl>
- </li>
- </ul>
- <a name="getValue-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getValue</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> getValue(<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">Returns the value/first value of this Option or the
- <code>defaultValue</code> if there is no value.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>defaultValue</code> - The value to be returned if there
- is no value.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the value/first value of this Option or the
- <code>defaultValue</code> if there are no values.</dd>
- </dl>
- </li>
- </ul>
- <a name="getValues--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getValues</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>[] getValues()</pre>
- <div class="block">Return the values of this Option as a String array
- or null if there are no values</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the values of this Option as a String array
- or null if there are no values</dd>
- </dl>
- </li>
- </ul>
- <a name="getValuesList--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getValuesList</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>> getValuesList()</pre>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the values of this Option as a List
- or null if there are no values</dd>
- </dl>
- </li>
- </ul>
- <a name="toString--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>toString</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> toString()</pre>
- <div class="block">Dump state, suitable for debugging.</div>
- <dl>
- <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
- <dd><code><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></code> in class <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></dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>Stringified form of this object</dd>
- </dl>
- </li>
- </ul>
- <a name="equals-java.lang.Object-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>equals</h4>
- <pre>public boolean equals(<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> o)</pre>
- <dl>
- <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
- <dd><code><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></code> in class <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></dd>
- </dl>
- </li>
- </ul>
- <a name="hashCode--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hashCode</h4>
- <pre>public int hashCode()</pre>
- <dl>
- <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
- <dd><code><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></code> in class <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></dd>
- </dl>
- </li>
- </ul>
- <a name="clone--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>clone</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> clone()</pre>
- <div class="block">A rather odd clone method - due to incorrect code in 1.0 it is public
- and in 1.1 rather than throwing a CloneNotSupportedException it throws
- a RuntimeException so as to maintain backwards compat at the API level.
-
- After calling this method, it is very likely you will want to call
- clearValues().</div>
- <dl>
- <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
- <dd><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></code> in class <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></dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>a clone of this Option instance</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang">RuntimeException</a></code> - if a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CloneNotSupportedException.html?is-external=true" title="class or interface in java.lang"><code>CloneNotSupportedException</code></a> has been thrown
- by <code>super.clone()</code></dd>
- </dl>
- </li>
- </ul>
- <a name="addValue-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>addValue</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 boolean addValue(<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> value)</pre>
- <div class="block"><span class="deprecatedLabel">Deprecated.</span> </div>
- <div class="block">This method is not intended to be used. It was a piece of internal
- API that was made public in 1.0. It currently throws an UnsupportedOperationException.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>value</code> - the value to add</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>always throws an <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang"><code>UnsupportedOperationException</code></a></dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - always</dd>
- </dl>
- </li>
- </ul>
- <a name="builder--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>builder</h4>
- <pre>public static <a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli">Option.Builder</a> builder()</pre>
- <div class="block">Returns a <a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli"><code>Option.Builder</code></a> to create an <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> using descriptive
- methods.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>a new <a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli"><code>Option.Builder</code></a> instance</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.3</dd>
- </dl>
- </li>
- </ul>
- <a name="builder-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>builder</h4>
- <pre>public static <a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli">Option.Builder</a> builder(<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">Returns a <a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli"><code>Option.Builder</code></a> to create an <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> using descriptive
- methods.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>opt</code> - short representation of the option</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>a new <a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli"><code>Option.Builder</code></a> instance</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if there are any non valid Option characters in <code>opt</code></dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.3</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/Option.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/MissingOptionException.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../../../../org/apache/commons/cli/Option.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/Option.html" target="_top">Frames</a></li>
- <li><a href="Option.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><a href="#field.summary">Field</a> | </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><a href="#field.detail">Field</a> | </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>
|