blob: fe5ec96c34fa13c070ab4f0fac377dc9e23e4b46 [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>OptionBuilder (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="OptionBuilder (Apache Commons CLI 1.4 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":41,"i1":41,"i2":41,"i3":41,"i4":41,"i5":41,"i6":41,"i7":41,"i8":41,"i9":41,"i10":41,"i11":41,"i12":41,"i13":41,"i14":41,"i15":41,"i16":41,"i17":41,"i18":41};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/OptionBuilder.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/Option.Builder.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/commons/cli/OptionGroup.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/OptionBuilder.html" target="_top">Frames</a></li>
<li><a href="OptionBuilder.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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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 OptionBuilder" class="title">Class OptionBuilder</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.OptionBuilder</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<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#builder-java.lang.String-"><code>Option.builder(String)</code></a> instead</span></div>
</div>
<br>
<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 final class <span class="typeNameLabel">OptionBuilder</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></pre>
<div class="block">OptionBuilder allows the user to create Options using descriptive methods.
<p>
Details on the Builder pattern can be found at
<a href="http://c2.com/cgi-bin/wiki?BuilderPattern">http://c2.com/cgi-bin/wiki?BuilderPattern</a>.
<p>
This class is NOT thread safe. See <a href="https://issues.apache.org/jira/browse/CLI-209">CLI-209</a></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
<dt><span class="simpleTagLabel">Version:</span></dt>
<dd>$Id: OptionBuilder.java 1677400 2015-05-03 13:46:08Z britter $</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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="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>static <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#create--">create</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">Create an Option using the current settings</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#create-char-">create</a></span>(char&nbsp;opt)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">Create an Option using the current settings and with
the specified Option <code>char</code>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#create-java.lang.String-">create</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"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">Create an Option using the current settings and with
the specified Option <code>char</code>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#hasArg--">hasArg</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will require an argument value.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#hasArg-boolean-">hasArg</a></span>(boolean&nbsp;hasArg)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will require an argument value if
<code>hasArg</code> is true.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#hasArgs--">hasArgs</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created can have unlimited argument values.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#hasArgs-int-">hasArgs</a></span>(int&nbsp;num)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created can have <code>num</code> argument values.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#hasOptionalArg--">hasOptionalArg</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option can have an optional argument.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#hasOptionalArgs--">hasOptionalArgs</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option can have an unlimited number of optional arguments.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#hasOptionalArgs-int-">hasOptionalArgs</a></span>(int&nbsp;numArgs)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option can have the specified number of optional arguments.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#isRequired--">isRequired</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will be required.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#isRequired-boolean-">isRequired</a></span>(boolean&nbsp;newRequired)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will be required if <code>required</code>
is true.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#withArgName-java.lang.String-">withArgName</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;name)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will have the specified argument value name.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#withDescription-java.lang.String-">withDescription</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;newDescription)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will have the specified description</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#withLongOpt-java.lang.String-">withLongOpt</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;newLongopt)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will have the following long option value.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#withType-java.lang.Class-">withType</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;newType)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will have a value that will be an instance
of <code>type</code>.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#withType-java.lang.Object-">withType</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;newType)</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/OptionBuilder.html#withType-java.lang.Class-"><code>withType(Class)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#withValueSeparator--">withValueSeparator</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created uses '<code>=</code>' as a means to
separate argument values.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/OptionBuilder.html#withValueSeparator-char-">withValueSeparator</a></span>(char&nbsp;sep)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created uses <code>sep</code> as a means to
separate argument values.</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#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="withLongOpt-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withLongOpt</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;withLongOpt(<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;newLongopt)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will have the following long option value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>newLongopt</code> - the long option value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="hasArg--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasArg</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;hasArg()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will require an argument value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="hasArg-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasArg</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;hasArg(boolean&nbsp;hasArg)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will require an argument value if
<code>hasArg</code> is true.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>hasArg</code> - if true then the Option has an argument value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="withArgName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withArgName</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;withArgName(<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;name)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will have the specified argument value name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name for the argument value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="isRequired--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRequired</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;isRequired()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will be required.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="withValueSeparator-char-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withValueSeparator</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;withValueSeparator(char&nbsp;sep)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created uses <code>sep</code> as a means to
separate argument values.
<p>
<b>Example:</b>
<pre>
Option opt = OptionBuilder.withValueSeparator('=')
.create('D');
String args = "-Dkey=value";
CommandLine line = parser.parse(args);
String propertyName = opt.getValue(0); // will be "key"
String propertyValue = opt.getValue(1); // will be "value"
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sep</code> - The value separator to be used for the argument values.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="withValueSeparator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withValueSeparator</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;withValueSeparator()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created uses '<code>=</code>' as a means to
separate argument values.
<b>Example:</b>
<pre>
Option opt = OptionBuilder.withValueSeparator()
.create('D');
CommandLine line = parser.parse(args);
String propertyName = opt.getValue(0);
String propertyValue = opt.getValue(1);
</pre></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="isRequired-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRequired</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;isRequired(boolean&nbsp;newRequired)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will be required if <code>required</code>
is true.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>newRequired</code> - if true then the Option is required</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="hasArgs--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasArgs</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;hasArgs()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created can have unlimited argument values.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="hasArgs-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasArgs</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;hasArgs(int&nbsp;num)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created can have <code>num</code> argument values.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>num</code> - the number of args that the option can have</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="hasOptionalArg--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasOptionalArg</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;hasOptionalArg()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option can have an optional argument.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="hasOptionalArgs--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasOptionalArgs</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;hasOptionalArgs()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option can have an unlimited number of optional arguments.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="hasOptionalArgs-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasOptionalArgs</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;hasOptionalArgs(int&nbsp;numArgs)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option can have the specified number of optional arguments.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>numArgs</code> - - the maximum number of optional arguments
the next Option created can have.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="withType-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withType</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 static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;withType(<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;newType)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">since 1.3, use <a href="../../../../org/apache/commons/cli/OptionBuilder.html#withType-java.lang.Class-"><code>withType(Class)</code></a> instead</span></div>
<div class="block">The next Option created will have a value that will be an instance
of <code>type</code>.
<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>newType</code> - the type of the Options argument value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="withType-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withType</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;withType(<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;newType)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will have a value that will be an instance
of <code>type</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>newType</code> - the type of the Options argument value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.3</dd>
</dl>
</li>
</ul>
<a name="withDescription-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withDescription</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/OptionBuilder.html" title="class in org.apache.commons.cli">OptionBuilder</a>&nbsp;withDescription(<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;newDescription)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">The next Option created will have the specified description</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>newDescription</code> - a description of the Option's purpose</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OptionBuilder instance</dd>
</dl>
</li>
</ul>
<a name="create-char-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;create(char&nbsp;opt)
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"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">Create an Option using the current settings and with
the specified Option <code>char</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>opt</code> - the character representation of the Option</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Option 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 <code>opt</code> is not
a valid character. See Option.</dd>
</dl>
</li>
</ul>
<a name="create--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;create()
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"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">Create an Option using the current settings</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Option 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 <code>longOpt</code> has not been set.</dd>
</dl>
</li>
</ul>
<a name="create-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;create(<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)
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"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
<div class="block">Create an Option using the current settings and with
the specified Option <code>char</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>opt</code> - the <code>java.lang.String</code> representation
of the Option</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Option 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 <code>opt</code> is not
a valid character. See Option.</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/OptionBuilder.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/Option.Builder.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/commons/cli/OptionGroup.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/OptionBuilder.html" target="_top">Frames</a></li>
<li><a href="OptionBuilder.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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>