Network programming assignment for University
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

669 lines
37 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="de">
  4. <head>
  5. <!-- Generated by javadoc -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  7. <title>Options (Apache Commons CLI 1.4 API)</title>
  8. <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
  9. <script type="text/javascript" src="../../../../script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="Options (Apache Commons CLI 1.4 API)";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10};
  22. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="../../../../org/apache/commons/cli/package-summary.html">Package</a></li>
  41. <li class="navBarCell1Rev">Class</li>
  42. <li><a href="class-use/Options.html">Use</a></li>
  43. <li><a href="package-tree.html">Tree</a></li>
  44. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  45. <li><a href="../../../../index-all.html">Index</a></li>
  46. <li><a href="../../../../help-doc.html">Help</a></li>
  47. </ul>
  48. </div>
  49. <div class="subNav">
  50. <ul class="navList">
  51. <li><a href="../../../../org/apache/commons/cli/OptionGroup.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  52. <li><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  53. </ul>
  54. <ul class="navList">
  55. <li><a href="../../../../index.html?org/apache/commons/cli/Options.html" target="_top">Frames</a></li>
  56. <li><a href="Options.html" target="_top">No&nbsp;Frames</a></li>
  57. </ul>
  58. <ul class="navList" id="allclasses_navbar_top">
  59. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  60. </ul>
  61. <div>
  62. <script type="text/javascript"><!--
  63. allClassesLink = document.getElementById("allclasses_navbar_top");
  64. if(window==top) {
  65. allClassesLink.style.display = "block";
  66. }
  67. else {
  68. allClassesLink.style.display = "none";
  69. }
  70. //-->
  71. </script>
  72. </div>
  73. <div>
  74. <ul class="subNavList">
  75. <li>Summary:&nbsp;</li>
  76. <li>Nested&nbsp;|&nbsp;</li>
  77. <li>Field&nbsp;|&nbsp;</li>
  78. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  79. <li><a href="#method.summary">Method</a></li>
  80. </ul>
  81. <ul class="subNavList">
  82. <li>Detail:&nbsp;</li>
  83. <li>Field&nbsp;|&nbsp;</li>
  84. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  85. <li><a href="#method.detail">Method</a></li>
  86. </ul>
  87. </div>
  88. <a name="skip.navbar.top">
  89. <!-- -->
  90. </a></div>
  91. <!-- ========= END OF TOP NAVBAR ========= -->
  92. <!-- ======== START OF CLASS DATA ======== -->
  93. <div class="header">
  94. <div class="subTitle">org.apache.commons.cli</div>
  95. <h2 title="Class Options" class="title">Class Options</h2>
  96. </div>
  97. <div class="contentContainer">
  98. <ul class="inheritance">
  99. <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>
  100. <li>
  101. <ul class="inheritance">
  102. <li>org.apache.commons.cli.Options</li>
  103. </ul>
  104. </li>
  105. </ul>
  106. <div class="description">
  107. <ul class="blockList">
  108. <li class="blockList">
  109. <dl>
  110. <dt>All Implemented Interfaces:</dt>
  111. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd>
  112. </dl>
  113. <hr>
  114. <br>
  115. <pre>public class <span class="typeNameLabel">Options</span>
  116. 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>
  117. implements <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
  118. <div class="block">Main entry-point into the library.
  119. <p>
  120. Options represents a collection of <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> objects, which
  121. describe the possible options for a command-line.
  122. <p>
  123. It may flexibly parse long and short options, with or without
  124. values. Additionally, it may parse only a portion of a commandline,
  125. allowing for flexible multi-stage parsing.</div>
  126. <dl>
  127. <dt><span class="simpleTagLabel">Version:</span></dt>
  128. <dd>$Id: Options.java 1754332 2016-07-27 18:47:57Z britter $</dd>
  129. <dt><span class="seeLabel">See Also:</span></dt>
  130. <dd><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli"><code>CommandLine</code></a>,
  131. <a href="../../../../serialized-form.html#org.apache.commons.cli.Options">Serialized Form</a></dd>
  132. </dl>
  133. </li>
  134. </ul>
  135. </div>
  136. <div class="summary">
  137. <ul class="blockList">
  138. <li class="blockList">
  139. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  140. <ul class="blockList">
  141. <li class="blockList"><a name="constructor.summary">
  142. <!-- -->
  143. </a>
  144. <h3>Constructor Summary</h3>
  145. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  146. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  147. <tr>
  148. <th class="colOne" scope="col">Constructor and Description</th>
  149. </tr>
  150. <tr class="altColor">
  151. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#Options--">Options</a></span>()</code>&nbsp;</td>
  152. </tr>
  153. </table>
  154. </li>
  155. </ul>
  156. <!-- ========== METHOD SUMMARY =========== -->
  157. <ul class="blockList">
  158. <li class="blockList"><a name="method.summary">
  159. <!-- -->
  160. </a>
  161. <h3>Method Summary</h3>
  162. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  163. <caption><span id="t0" class="activeTableTab"><span>All Methods</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></caption>
  164. <tr>
  165. <th class="colFirst" scope="col">Modifier and Type</th>
  166. <th class="colLast" scope="col">Method and Description</th>
  167. </tr>
  168. <tr id="i0" class="altColor">
  169. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a></code></td>
  170. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#addOption-org.apache.commons.cli.Option-">addOption</a></span>(<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;opt)</code>
  171. <div class="block">Adds an option instance</div>
  172. </td>
  173. </tr>
  174. <tr id="i1" class="rowColor">
  175. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a></code></td>
  176. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#addOption-java.lang.String-boolean-java.lang.String-">addOption</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,
  177. boolean&nbsp;hasArg,
  178. <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>
  179. <div class="block">Add an option that only contains a short-name.</div>
  180. </td>
  181. </tr>
  182. <tr id="i2" class="altColor">
  183. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a></code></td>
  184. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#addOption-java.lang.String-java.lang.String-">addOption</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,
  185. <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>
  186. <div class="block">Add an option that only contains a short name.</div>
  187. </td>
  188. </tr>
  189. <tr id="i3" class="rowColor">
  190. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a></code></td>
  191. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#addOption-java.lang.String-java.lang.String-boolean-java.lang.String-">addOption</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,
  192. <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,
  193. boolean&nbsp;hasArg,
  194. <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>
  195. <div class="block">Add an option that contains a short-name and a long-name.</div>
  196. </td>
  197. </tr>
  198. <tr id="i4" class="altColor">
  199. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a></code></td>
  200. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#addOptionGroup-org.apache.commons.cli.OptionGroup-">addOptionGroup</a></span>(<a href="../../../../org/apache/commons/cli/OptionGroup.html" title="class in org.apache.commons.cli">OptionGroup</a>&nbsp;group)</code>
  201. <div class="block">Add the specified option group.</div>
  202. </td>
  203. </tr>
  204. <tr id="i5" class="rowColor">
  205. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a></code></td>
  206. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#addRequiredOption-java.lang.String-java.lang.String-boolean-java.lang.String-">addRequiredOption</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,
  207. <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,
  208. boolean&nbsp;hasArg,
  209. <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>
  210. <div class="block">Add an option that contains a short-name and a long-name.</div>
  211. </td>
  212. </tr>
  213. <tr id="i6" class="altColor">
  214. <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>
  215. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#getMatchingOptions-java.lang.String-">getMatchingOptions</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>
  216. <div class="block">Returns the options with a long name starting with the name specified.</div>
  217. </td>
  218. </tr>
  219. <tr id="i7" class="rowColor">
  220. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a></code></td>
  221. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#getOption-java.lang.String-">getOption</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>
  222. <div class="block">Retrieve the <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> matching the long or short name specified.</div>
  223. </td>
  224. </tr>
  225. <tr id="i8" class="altColor">
  226. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/OptionGroup.html" title="class in org.apache.commons.cli">OptionGroup</a></code></td>
  227. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#getOptionGroup-org.apache.commons.cli.Option-">getOptionGroup</a></span>(<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;opt)</code>
  228. <div class="block">Returns the OptionGroup the <code>opt</code> belongs to.</div>
  229. </td>
  230. </tr>
  231. <tr id="i9" class="rowColor">
  232. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&gt;</code></td>
  233. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#getOptions--">getOptions</a></span>()</code>
  234. <div class="block">Retrieve a read-only list of options in this set</div>
  235. </td>
  236. </tr>
  237. <tr id="i10" class="altColor">
  238. <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></code></td>
  239. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#getRequiredOptions--">getRequiredOptions</a></span>()</code>
  240. <div class="block">Returns the required options.</div>
  241. </td>
  242. </tr>
  243. <tr id="i11" class="rowColor">
  244. <td class="colFirst"><code>boolean</code></td>
  245. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#hasLongOption-java.lang.String-">hasLongOption</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>
  246. <div class="block">Returns whether the named <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> is a member of this <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>.</div>
  247. </td>
  248. </tr>
  249. <tr id="i12" class="altColor">
  250. <td class="colFirst"><code>boolean</code></td>
  251. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#hasOption-java.lang.String-">hasOption</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</code>
  252. <div class="block">Returns whether the named <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> is a member of this <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>.</div>
  253. </td>
  254. </tr>
  255. <tr id="i13" class="rowColor">
  256. <td class="colFirst"><code>boolean</code></td>
  257. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#hasShortOption-java.lang.String-">hasShortOption</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>
  258. <div class="block">Returns whether the named <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> is a member of this <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>.</div>
  259. </td>
  260. </tr>
  261. <tr id="i14" class="altColor">
  262. <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>
  263. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Options.html#toString--">toString</a></span>()</code>
  264. <div class="block">Dump state, suitable for debugging.</div>
  265. </td>
  266. </tr>
  267. </table>
  268. <ul class="blockList">
  269. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  270. <!-- -->
  271. </a>
  272. <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>
  273. <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#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>
  274. </ul>
  275. </li>
  276. </ul>
  277. </li>
  278. </ul>
  279. </div>
  280. <div class="details">
  281. <ul class="blockList">
  282. <li class="blockList">
  283. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  284. <ul class="blockList">
  285. <li class="blockList"><a name="constructor.detail">
  286. <!-- -->
  287. </a>
  288. <h3>Constructor Detail</h3>
  289. <a name="Options--">
  290. <!-- -->
  291. </a>
  292. <ul class="blockListLast">
  293. <li class="blockList">
  294. <h4>Options</h4>
  295. <pre>public&nbsp;Options()</pre>
  296. </li>
  297. </ul>
  298. </li>
  299. </ul>
  300. <!-- ============ METHOD DETAIL ========== -->
  301. <ul class="blockList">
  302. <li class="blockList"><a name="method.detail">
  303. <!-- -->
  304. </a>
  305. <h3>Method Detail</h3>
  306. <a name="addOptionGroup-org.apache.commons.cli.OptionGroup-">
  307. <!-- -->
  308. </a>
  309. <ul class="blockList">
  310. <li class="blockList">
  311. <h4>addOptionGroup</h4>
  312. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;addOptionGroup(<a href="../../../../org/apache/commons/cli/OptionGroup.html" title="class in org.apache.commons.cli">OptionGroup</a>&nbsp;group)</pre>
  313. <div class="block">Add the specified option group.</div>
  314. <dl>
  315. <dt><span class="paramLabel">Parameters:</span></dt>
  316. <dd><code>group</code> - the OptionGroup that is to be added</dd>
  317. <dt><span class="returnLabel">Returns:</span></dt>
  318. <dd>the resulting Options instance</dd>
  319. </dl>
  320. </li>
  321. </ul>
  322. <a name="addOption-java.lang.String-java.lang.String-">
  323. <!-- -->
  324. </a>
  325. <ul class="blockList">
  326. <li class="blockList">
  327. <h4>addOption</h4>
  328. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;addOption(<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,
  329. <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>
  330. <div class="block">Add an option that only contains a short name.
  331. <p>
  332. The option does not take an argument.
  333. </p></div>
  334. <dl>
  335. <dt><span class="paramLabel">Parameters:</span></dt>
  336. <dd><code>opt</code> - Short single-character name of the option.</dd>
  337. <dd><code>description</code> - Self-documenting description</dd>
  338. <dt><span class="returnLabel">Returns:</span></dt>
  339. <dd>the resulting Options instance</dd>
  340. <dt><span class="simpleTagLabel">Since:</span></dt>
  341. <dd>1.3</dd>
  342. </dl>
  343. </li>
  344. </ul>
  345. <a name="addOption-java.lang.String-boolean-java.lang.String-">
  346. <!-- -->
  347. </a>
  348. <ul class="blockList">
  349. <li class="blockList">
  350. <h4>addOption</h4>
  351. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;addOption(<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,
  352. boolean&nbsp;hasArg,
  353. <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>
  354. <div class="block">Add an option that only contains a short-name.
  355. <p>
  356. It may be specified as requiring an argument.
  357. </p></div>
  358. <dl>
  359. <dt><span class="paramLabel">Parameters:</span></dt>
  360. <dd><code>opt</code> - Short single-character name of the option.</dd>
  361. <dd><code>hasArg</code> - flag signally if an argument is required after this option</dd>
  362. <dd><code>description</code> - Self-documenting description</dd>
  363. <dt><span class="returnLabel">Returns:</span></dt>
  364. <dd>the resulting Options instance</dd>
  365. </dl>
  366. </li>
  367. </ul>
  368. <a name="addOption-java.lang.String-java.lang.String-boolean-java.lang.String-">
  369. <!-- -->
  370. </a>
  371. <ul class="blockList">
  372. <li class="blockList">
  373. <h4>addOption</h4>
  374. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;addOption(<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,
  375. <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,
  376. boolean&nbsp;hasArg,
  377. <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>
  378. <div class="block">Add an option that contains a short-name and a long-name.
  379. <p>
  380. It may be specified as requiring an argument.
  381. </p></div>
  382. <dl>
  383. <dt><span class="paramLabel">Parameters:</span></dt>
  384. <dd><code>opt</code> - Short single-character name of the option.</dd>
  385. <dd><code>longOpt</code> - Long multi-character name of the option.</dd>
  386. <dd><code>hasArg</code> - flag signally if an argument is required after this option</dd>
  387. <dd><code>description</code> - Self-documenting description</dd>
  388. <dt><span class="returnLabel">Returns:</span></dt>
  389. <dd>the resulting Options instance</dd>
  390. </dl>
  391. </li>
  392. </ul>
  393. <a name="addRequiredOption-java.lang.String-java.lang.String-boolean-java.lang.String-">
  394. <!-- -->
  395. </a>
  396. <ul class="blockList">
  397. <li class="blockList">
  398. <h4>addRequiredOption</h4>
  399. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;addRequiredOption(<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,
  400. <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,
  401. boolean&nbsp;hasArg,
  402. <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>
  403. <div class="block">Add an option that contains a short-name and a long-name.
  404. <p>
  405. The added option is set as required. It may be specified as requiring an argument. This method is a shortcut for:
  406. </p>
  407. <pre>
  408. <code>
  409. Options option = new Option(opt, longOpt, hasArg, description);
  410. option.setRequired(true);
  411. options.add(option);
  412. </code>
  413. </pre></div>
  414. <dl>
  415. <dt><span class="paramLabel">Parameters:</span></dt>
  416. <dd><code>opt</code> - Short single-character name of the option.</dd>
  417. <dd><code>longOpt</code> - Long multi-character name of the option.</dd>
  418. <dd><code>hasArg</code> - flag signally if an argument is required after this option</dd>
  419. <dd><code>description</code> - Self-documenting description</dd>
  420. <dt><span class="returnLabel">Returns:</span></dt>
  421. <dd>the resulting Options instance</dd>
  422. <dt><span class="simpleTagLabel">Since:</span></dt>
  423. <dd>1.4</dd>
  424. </dl>
  425. </li>
  426. </ul>
  427. <a name="addOption-org.apache.commons.cli.Option-">
  428. <!-- -->
  429. </a>
  430. <ul class="blockList">
  431. <li class="blockList">
  432. <h4>addOption</h4>
  433. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;addOption(<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;opt)</pre>
  434. <div class="block">Adds an option instance</div>
  435. <dl>
  436. <dt><span class="paramLabel">Parameters:</span></dt>
  437. <dd><code>opt</code> - the option that is to be added</dd>
  438. <dt><span class="returnLabel">Returns:</span></dt>
  439. <dd>the resulting Options instance</dd>
  440. </dl>
  441. </li>
  442. </ul>
  443. <a name="getOptions--">
  444. <!-- -->
  445. </a>
  446. <ul class="blockList">
  447. <li class="blockList">
  448. <h4>getOptions</h4>
  449. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&gt;&nbsp;getOptions()</pre>
  450. <div class="block">Retrieve a read-only list of options in this set</div>
  451. <dl>
  452. <dt><span class="returnLabel">Returns:</span></dt>
  453. <dd>read-only Collection of <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> objects in this descriptor</dd>
  454. </dl>
  455. </li>
  456. </ul>
  457. <a name="getRequiredOptions--">
  458. <!-- -->
  459. </a>
  460. <ul class="blockList">
  461. <li class="blockList">
  462. <h4>getRequiredOptions</h4>
  463. <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>&nbsp;getRequiredOptions()</pre>
  464. <div class="block">Returns the required options.</div>
  465. <dl>
  466. <dt><span class="returnLabel">Returns:</span></dt>
  467. <dd>read-only List of required options</dd>
  468. </dl>
  469. </li>
  470. </ul>
  471. <a name="getOption-java.lang.String-">
  472. <!-- -->
  473. </a>
  474. <ul class="blockList">
  475. <li class="blockList">
  476. <h4>getOption</h4>
  477. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;getOption(<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>
  478. <div class="block">Retrieve the <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> matching the long or short name specified.
  479. <p>
  480. The leading hyphens in the name are ignored (up to 2).
  481. </p></div>
  482. <dl>
  483. <dt><span class="paramLabel">Parameters:</span></dt>
  484. <dd><code>opt</code> - short or long name of the <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a></dd>
  485. <dt><span class="returnLabel">Returns:</span></dt>
  486. <dd>the option represented by opt</dd>
  487. </dl>
  488. </li>
  489. </ul>
  490. <a name="getMatchingOptions-java.lang.String-">
  491. <!-- -->
  492. </a>
  493. <ul class="blockList">
  494. <li class="blockList">
  495. <h4>getMatchingOptions</h4>
  496. <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;getMatchingOptions(<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>
  497. <div class="block">Returns the options with a long name starting with the name specified.</div>
  498. <dl>
  499. <dt><span class="paramLabel">Parameters:</span></dt>
  500. <dd><code>opt</code> - the partial name of the option</dd>
  501. <dt><span class="returnLabel">Returns:</span></dt>
  502. <dd>the options matching the partial name specified, or an empty list if none matches</dd>
  503. <dt><span class="simpleTagLabel">Since:</span></dt>
  504. <dd>1.3</dd>
  505. </dl>
  506. </li>
  507. </ul>
  508. <a name="hasOption-java.lang.String-">
  509. <!-- -->
  510. </a>
  511. <ul class="blockList">
  512. <li class="blockList">
  513. <h4>hasOption</h4>
  514. <pre>public&nbsp;boolean&nbsp;hasOption(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</pre>
  515. <div class="block">Returns whether the named <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> is a member of this <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>.</div>
  516. <dl>
  517. <dt><span class="paramLabel">Parameters:</span></dt>
  518. <dd><code>opt</code> - short or long name of the <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a></dd>
  519. <dt><span class="returnLabel">Returns:</span></dt>
  520. <dd>true if the named <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> is a member of this <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a></dd>
  521. </dl>
  522. </li>
  523. </ul>
  524. <a name="hasLongOption-java.lang.String-">
  525. <!-- -->
  526. </a>
  527. <ul class="blockList">
  528. <li class="blockList">
  529. <h4>hasLongOption</h4>
  530. <pre>public&nbsp;boolean&nbsp;hasLongOption(<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>
  531. <div class="block">Returns whether the named <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> is a member of this <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>.</div>
  532. <dl>
  533. <dt><span class="paramLabel">Parameters:</span></dt>
  534. <dd><code>opt</code> - long name of the <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a></dd>
  535. <dt><span class="returnLabel">Returns:</span></dt>
  536. <dd>true if the named <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> is a member of this <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a></dd>
  537. <dt><span class="simpleTagLabel">Since:</span></dt>
  538. <dd>1.3</dd>
  539. </dl>
  540. </li>
  541. </ul>
  542. <a name="hasShortOption-java.lang.String-">
  543. <!-- -->
  544. </a>
  545. <ul class="blockList">
  546. <li class="blockList">
  547. <h4>hasShortOption</h4>
  548. <pre>public&nbsp;boolean&nbsp;hasShortOption(<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>
  549. <div class="block">Returns whether the named <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> is a member of this <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>.</div>
  550. <dl>
  551. <dt><span class="paramLabel">Parameters:</span></dt>
  552. <dd><code>opt</code> - short name of the <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a></dd>
  553. <dt><span class="returnLabel">Returns:</span></dt>
  554. <dd>true if the named <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> is a member of this <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a></dd>
  555. <dt><span class="simpleTagLabel">Since:</span></dt>
  556. <dd>1.3</dd>
  557. </dl>
  558. </li>
  559. </ul>
  560. <a name="getOptionGroup-org.apache.commons.cli.Option-">
  561. <!-- -->
  562. </a>
  563. <ul class="blockList">
  564. <li class="blockList">
  565. <h4>getOptionGroup</h4>
  566. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/OptionGroup.html" title="class in org.apache.commons.cli">OptionGroup</a>&nbsp;getOptionGroup(<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;opt)</pre>
  567. <div class="block">Returns the OptionGroup the <code>opt</code> belongs to.</div>
  568. <dl>
  569. <dt><span class="paramLabel">Parameters:</span></dt>
  570. <dd><code>opt</code> - the option whose OptionGroup is being queried.</dd>
  571. <dt><span class="returnLabel">Returns:</span></dt>
  572. <dd>the OptionGroup if <code>opt</code> is part of an OptionGroup, otherwise return null</dd>
  573. </dl>
  574. </li>
  575. </ul>
  576. <a name="toString--">
  577. <!-- -->
  578. </a>
  579. <ul class="blockListLast">
  580. <li class="blockList">
  581. <h4>toString</h4>
  582. <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>
  583. <div class="block">Dump state, suitable for debugging.</div>
  584. <dl>
  585. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  586. <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>
  587. <dt><span class="returnLabel">Returns:</span></dt>
  588. <dd>Stringified form of this object</dd>
  589. </dl>
  590. </li>
  591. </ul>
  592. </li>
  593. </ul>
  594. </li>
  595. </ul>
  596. </div>
  597. </div>
  598. <!-- ========= END OF CLASS DATA ========= -->
  599. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  600. <div class="bottomNav"><a name="navbar.bottom">
  601. <!-- -->
  602. </a>
  603. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  604. <a name="navbar.bottom.firstrow">
  605. <!-- -->
  606. </a>
  607. <ul class="navList" title="Navigation">
  608. <li><a href="../../../../org/apache/commons/cli/package-summary.html">Package</a></li>
  609. <li class="navBarCell1Rev">Class</li>
  610. <li><a href="class-use/Options.html">Use</a></li>
  611. <li><a href="package-tree.html">Tree</a></li>
  612. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  613. <li><a href="../../../../index-all.html">Index</a></li>
  614. <li><a href="../../../../help-doc.html">Help</a></li>
  615. </ul>
  616. </div>
  617. <div class="subNav">
  618. <ul class="navList">
  619. <li><a href="../../../../org/apache/commons/cli/OptionGroup.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  620. <li><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  621. </ul>
  622. <ul class="navList">
  623. <li><a href="../../../../index.html?org/apache/commons/cli/Options.html" target="_top">Frames</a></li>
  624. <li><a href="Options.html" target="_top">No&nbsp;Frames</a></li>
  625. </ul>
  626. <ul class="navList" id="allclasses_navbar_bottom">
  627. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  628. </ul>
  629. <div>
  630. <script type="text/javascript"><!--
  631. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  632. if(window==top) {
  633. allClassesLink.style.display = "block";
  634. }
  635. else {
  636. allClassesLink.style.display = "none";
  637. }
  638. //-->
  639. </script>
  640. </div>
  641. <div>
  642. <ul class="subNavList">
  643. <li>Summary:&nbsp;</li>
  644. <li>Nested&nbsp;|&nbsp;</li>
  645. <li>Field&nbsp;|&nbsp;</li>
  646. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  647. <li><a href="#method.summary">Method</a></li>
  648. </ul>
  649. <ul class="subNavList">
  650. <li>Detail:&nbsp;</li>
  651. <li>Field&nbsp;|&nbsp;</li>
  652. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  653. <li><a href="#method.detail">Method</a></li>
  654. </ul>
  655. </div>
  656. <a name="skip.navbar.bottom">
  657. <!-- -->
  658. </a></div>
  659. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  660. <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>
  661. </body>
  662. </html>