blob: 2c832fc04c685cf08f6b47975ac753ad882d1655 [file] [log] [blame]
<!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&nbsp;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&nbsp;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&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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">&nbsp;</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&nbsp;</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">&nbsp;</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">&nbsp;</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>&nbsp;opt,
boolean&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;longOpt,
boolean&nbsp;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>&nbsp;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">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</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>&nbsp;value)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;&nbsp;</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>&nbsp;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>&nbsp;o)</code>&nbsp;</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&nbsp;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>&nbsp;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>&lt;<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>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Option.html#getValuesList--">getValuesList</a></span>()</code>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;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&nbsp;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>&nbsp;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>&nbsp;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&nbsp;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&nbsp;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>&lt;?&gt;&nbsp;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>&nbsp;type)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<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&nbsp;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&nbsp;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&nbsp;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&nbsp;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&nbsp;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>&nbsp;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>&nbsp;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&nbsp;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>&nbsp;opt,
boolean&nbsp;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>&nbsp;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&nbsp;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>&nbsp;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>&nbsp;longOpt,
boolean&nbsp;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>&nbsp;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&nbsp;int&nbsp;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&nbsp;<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>&nbsp;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&nbsp;<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>&nbsp;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&nbsp;void&nbsp;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>&nbsp;type)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<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&nbsp;void&nbsp;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>&lt;?&gt;&nbsp;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&nbsp;<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>&nbsp;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&nbsp;void&nbsp;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>&nbsp;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&nbsp;void&nbsp;setOptionalArg(boolean&nbsp;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&nbsp;boolean&nbsp;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&nbsp;boolean&nbsp;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&nbsp;boolean&nbsp;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&nbsp;<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>&nbsp;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&nbsp;void&nbsp;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>&nbsp;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&nbsp;boolean&nbsp;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&nbsp;void&nbsp;setRequired(boolean&nbsp;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&nbsp;void&nbsp;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>&nbsp;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&nbsp;<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>&nbsp;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&nbsp;boolean&nbsp;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&nbsp;boolean&nbsp;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&nbsp;void&nbsp;setArgs(int&nbsp;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&nbsp;void&nbsp;setValueSeparator(char&nbsp;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&nbsp;char&nbsp;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&nbsp;boolean&nbsp;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&nbsp;int&nbsp;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&nbsp;<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>&nbsp;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&nbsp;<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>&nbsp;getValue(int&nbsp;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&nbsp;<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>&nbsp;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>&nbsp;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&nbsp;<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>[]&nbsp;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&nbsp;<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>&lt;<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>&gt;&nbsp;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&nbsp;<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>&nbsp;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>&nbsp;in class&nbsp;<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&nbsp;boolean&nbsp;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>&nbsp;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>&nbsp;in class&nbsp;<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&nbsp;int&nbsp;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>&nbsp;in class&nbsp;<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&nbsp;<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>&nbsp;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>&nbsp;in class&nbsp;<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&nbsp;boolean&nbsp;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>&nbsp;value)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</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&nbsp;<a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli">Option.Builder</a>&nbsp;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&nbsp;<a href="../../../../org/apache/commons/cli/Option.Builder.html" title="class in org.apache.commons.cli">Option.Builder</a>&nbsp;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>&nbsp;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&nbsp;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&nbsp;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&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 2002&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>