Network programming assignment for University
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

722 lignes
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>CommandLine (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="CommandLine (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":42,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10};
  22. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated 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/CommandLine.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/BasicParser.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/CommandLine.Builder.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/CommandLine.html" target="_top">Frames</a></li>
  56. <li><a href="CommandLine.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><a href="#nested.class.summary">Nested</a>&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 CommandLine" class="title">Class CommandLine</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.CommandLine</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">CommandLine</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">Represents list of arguments parsed against a <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a> descriptor.
  119. <p>
  120. It allows querying of a boolean <a href="../../../../org/apache/commons/cli/CommandLine.html#hasOption-java.lang.String-"><code>hasOption(String opt)</code></a>,
  121. in addition to retrieving the <a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValue-java.lang.String-"><code>getOptionValue(String opt)</code></a>
  122. for options requiring arguments.
  123. <p>
  124. Additionally, any left-over or unrecognized arguments,
  125. are available for further processing.</div>
  126. <dl>
  127. <dt><span class="simpleTagLabel">Version:</span></dt>
  128. <dd>$Id: CommandLine.java 1786144 2017-03-09 11:34:57Z britter $</dd>
  129. <dt><span class="seeLabel">See Also:</span></dt>
  130. <dd><a href="../../../../serialized-form.html#org.apache.commons.cli.CommandLine">Serialized Form</a></dd>
  131. </dl>
  132. </li>
  133. </ul>
  134. </div>
  135. <div class="summary">
  136. <ul class="blockList">
  137. <li class="blockList">
  138. <!-- ======== NESTED CLASS SUMMARY ======== -->
  139. <ul class="blockList">
  140. <li class="blockList"><a name="nested.class.summary">
  141. <!-- -->
  142. </a>
  143. <h3>Nested Class Summary</h3>
  144. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
  145. <caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
  146. <tr>
  147. <th class="colFirst" scope="col">Modifier and Type</th>
  148. <th class="colLast" scope="col">Class and Description</th>
  149. </tr>
  150. <tr class="altColor">
  151. <td class="colFirst"><code>static class&nbsp;</code></td>
  152. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.Builder.html" title="class in org.apache.commons.cli">CommandLine.Builder</a></span></code>
  153. <div class="block">A nested builder class to create <code>CommandLine</code> instance
  154. using descriptive methods.</div>
  155. </td>
  156. </tr>
  157. </table>
  158. </li>
  159. </ul>
  160. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  161. <ul class="blockList">
  162. <li class="blockList"><a name="constructor.summary">
  163. <!-- -->
  164. </a>
  165. <h3>Constructor Summary</h3>
  166. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  167. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  168. <tr>
  169. <th class="colFirst" scope="col">Modifier</th>
  170. <th class="colLast" scope="col">Constructor and Description</th>
  171. </tr>
  172. <tr class="altColor">
  173. <td class="colFirst"><code>protected </code></td>
  174. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#CommandLine--">CommandLine</a></span>()</code>
  175. <div class="block">Creates a command line.</div>
  176. </td>
  177. </tr>
  178. </table>
  179. </li>
  180. </ul>
  181. <!-- ========== METHOD SUMMARY =========== -->
  182. <ul class="blockList">
  183. <li class="blockList"><a name="method.summary">
  184. <!-- -->
  185. </a>
  186. <h3>Method Summary</h3>
  187. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  188. <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><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  189. <tr>
  190. <th class="colFirst" scope="col">Modifier and Type</th>
  191. <th class="colLast" scope="col">Method and Description</th>
  192. </tr>
  193. <tr id="i0" class="altColor">
  194. <td class="colFirst"><code>protected void</code></td>
  195. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#addArg-java.lang.String-">addArg</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;arg)</code>
  196. <div class="block">Add left-over unrecognized option/argument.</div>
  197. </td>
  198. </tr>
  199. <tr id="i1" class="rowColor">
  200. <td class="colFirst"><code>protected void</code></td>
  201. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#addOption-org.apache.commons.cli.Option-">addOption</a></span>(<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;opt)</code>
  202. <div class="block">Add an option to the command line.</div>
  203. </td>
  204. </tr>
  205. <tr id="i2" class="altColor">
  206. <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>
  207. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getArgList--">getArgList</a></span>()</code>
  208. <div class="block">Retrieve any left-over non-recognized options and arguments</div>
  209. </td>
  210. </tr>
  211. <tr id="i3" class="rowColor">
  212. <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>
  213. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getArgs--">getArgs</a></span>()</code>
  214. <div class="block">Retrieve any left-over non-recognized options and arguments</div>
  215. </td>
  216. </tr>
  217. <tr id="i4" class="altColor">
  218. <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>
  219. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionObject-char-">getOptionObject</a></span>(char&nbsp;opt)</code>
  220. <div class="block">Return the <code>Object</code> type of this <code>Option</code>.</div>
  221. </td>
  222. </tr>
  223. <tr id="i5" class="rowColor">
  224. <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>
  225. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionObject-java.lang.String-">getOptionObject</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</code>
  226. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  227. <div class="block"><span class="deprecationComment">due to System.err message. Instead use getParsedOptionValue(String)</span></div>
  228. </div>
  229. </td>
  230. </tr>
  231. <tr id="i6" class="altColor">
  232. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a></code></td>
  233. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionProperties-java.lang.String-">getOptionProperties</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</code>
  234. <div class="block">Retrieve the map of values associated to the option.</div>
  235. </td>
  236. </tr>
  237. <tr id="i7" class="rowColor">
  238. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>[]</code></td>
  239. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptions--">getOptions</a></span>()</code>
  240. <div class="block">Returns an array of the processed <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a>s.</div>
  241. </td>
  242. </tr>
  243. <tr id="i8" class="altColor">
  244. <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>
  245. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValue-char-">getOptionValue</a></span>(char&nbsp;opt)</code>
  246. <div class="block">Retrieve the first argument, if any, of this option.</div>
  247. </td>
  248. </tr>
  249. <tr id="i9" class="rowColor">
  250. <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>
  251. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValue-char-java.lang.String-">getOptionValue</a></span>(char&nbsp;opt,
  252. <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>
  253. <div class="block">Retrieve the argument, if any, of an option.</div>
  254. </td>
  255. </tr>
  256. <tr id="i10" class="altColor">
  257. <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>
  258. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValue-java.lang.String-">getOptionValue</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</code>
  259. <div class="block">Retrieve the first argument, if any, of this option.</div>
  260. </td>
  261. </tr>
  262. <tr id="i11" class="rowColor">
  263. <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>
  264. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValue-java.lang.String-java.lang.String-">getOptionValue</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt,
  265. <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>
  266. <div class="block">Retrieve the first argument, if any, of an option.</div>
  267. </td>
  268. </tr>
  269. <tr id="i12" class="altColor">
  270. <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>
  271. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValues-char-">getOptionValues</a></span>(char&nbsp;opt)</code>
  272. <div class="block">Retrieves the array of values, if any, of an option.</div>
  273. </td>
  274. </tr>
  275. <tr id="i13" class="rowColor">
  276. <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>
  277. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getOptionValues-java.lang.String-">getOptionValues</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</code>
  278. <div class="block">Retrieves the array of values, if any, of an option.</div>
  279. </td>
  280. </tr>
  281. <tr id="i14" class="altColor">
  282. <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>
  283. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#getParsedOptionValue-java.lang.String-">getParsedOptionValue</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</code>
  284. <div class="block">Return a version of this <code>Option</code> converted to a particular type.</div>
  285. </td>
  286. </tr>
  287. <tr id="i15" class="rowColor">
  288. <td class="colFirst"><code>boolean</code></td>
  289. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#hasOption-char-">hasOption</a></span>(char&nbsp;opt)</code>
  290. <div class="block">Query to see if an option has been set.</div>
  291. </td>
  292. </tr>
  293. <tr id="i16" class="altColor">
  294. <td class="colFirst"><code>boolean</code></td>
  295. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#hasOption-java.lang.String-">hasOption</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</code>
  296. <div class="block">Query to see if an option has been set.</div>
  297. </td>
  298. </tr>
  299. <tr id="i17" class="rowColor">
  300. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&gt;</code></td>
  301. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLine.html#iterator--">iterator</a></span>()</code>
  302. <div class="block">Returns an iterator over the Option members of CommandLine.</div>
  303. </td>
  304. </tr>
  305. </table>
  306. <ul class="blockList">
  307. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  308. <!-- -->
  309. </a>
  310. <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>
  311. <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>
  312. </ul>
  313. </li>
  314. </ul>
  315. </li>
  316. </ul>
  317. </div>
  318. <div class="details">
  319. <ul class="blockList">
  320. <li class="blockList">
  321. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  322. <ul class="blockList">
  323. <li class="blockList"><a name="constructor.detail">
  324. <!-- -->
  325. </a>
  326. <h3>Constructor Detail</h3>
  327. <a name="CommandLine--">
  328. <!-- -->
  329. </a>
  330. <ul class="blockListLast">
  331. <li class="blockList">
  332. <h4>CommandLine</h4>
  333. <pre>protected&nbsp;CommandLine()</pre>
  334. <div class="block">Creates a command line.</div>
  335. </li>
  336. </ul>
  337. </li>
  338. </ul>
  339. <!-- ============ METHOD DETAIL ========== -->
  340. <ul class="blockList">
  341. <li class="blockList"><a name="method.detail">
  342. <!-- -->
  343. </a>
  344. <h3>Method Detail</h3>
  345. <a name="hasOption-java.lang.String-">
  346. <!-- -->
  347. </a>
  348. <ul class="blockList">
  349. <li class="blockList">
  350. <h4>hasOption</h4>
  351. <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>
  352. <div class="block">Query to see if an option has been set.</div>
  353. <dl>
  354. <dt><span class="paramLabel">Parameters:</span></dt>
  355. <dd><code>opt</code> - Short name of the option</dd>
  356. <dt><span class="returnLabel">Returns:</span></dt>
  357. <dd>true if set, false if not</dd>
  358. </dl>
  359. </li>
  360. </ul>
  361. <a name="hasOption-char-">
  362. <!-- -->
  363. </a>
  364. <ul class="blockList">
  365. <li class="blockList">
  366. <h4>hasOption</h4>
  367. <pre>public&nbsp;boolean&nbsp;hasOption(char&nbsp;opt)</pre>
  368. <div class="block">Query to see if an option has been set.</div>
  369. <dl>
  370. <dt><span class="paramLabel">Parameters:</span></dt>
  371. <dd><code>opt</code> - character name of the option</dd>
  372. <dt><span class="returnLabel">Returns:</span></dt>
  373. <dd>true if set, false if not</dd>
  374. </dl>
  375. </li>
  376. </ul>
  377. <a name="getOptionObject-java.lang.String-">
  378. <!-- -->
  379. </a>
  380. <ul class="blockList">
  381. <li class="blockList">
  382. <h4>getOptionObject</h4>
  383. <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>
  384. 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;getOptionObject(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</pre>
  385. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">due to System.err message. Instead use getParsedOptionValue(String)</span></div>
  386. <div class="block">Return the <code>Object</code> type of this <code>Option</code>.</div>
  387. <dl>
  388. <dt><span class="paramLabel">Parameters:</span></dt>
  389. <dd><code>opt</code> - the name of the option</dd>
  390. <dt><span class="returnLabel">Returns:</span></dt>
  391. <dd>the type of this <code>Option</code></dd>
  392. </dl>
  393. </li>
  394. </ul>
  395. <a name="getParsedOptionValue-java.lang.String-">
  396. <!-- -->
  397. </a>
  398. <ul class="blockList">
  399. <li class="blockList">
  400. <h4>getParsedOptionValue</h4>
  401. <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;getParsedOptionValue(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)
  402. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  403. <div class="block">Return a version of this <code>Option</code> converted to a particular type.</div>
  404. <dl>
  405. <dt><span class="paramLabel">Parameters:</span></dt>
  406. <dd><code>opt</code> - the name of the option</dd>
  407. <dt><span class="returnLabel">Returns:</span></dt>
  408. <dd>the value parsed into a particular object</dd>
  409. <dt><span class="throwsLabel">Throws:</span></dt>
  410. <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if there are problems turning the option value into the desired type</dd>
  411. <dt><span class="simpleTagLabel">Since:</span></dt>
  412. <dd>1.2</dd>
  413. <dt><span class="seeLabel">See Also:</span></dt>
  414. <dd><a href="../../../../org/apache/commons/cli/PatternOptionBuilder.html" title="class in org.apache.commons.cli"><code>PatternOptionBuilder</code></a></dd>
  415. </dl>
  416. </li>
  417. </ul>
  418. <a name="getOptionObject-char-">
  419. <!-- -->
  420. </a>
  421. <ul class="blockList">
  422. <li class="blockList">
  423. <h4>getOptionObject</h4>
  424. <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;getOptionObject(char&nbsp;opt)</pre>
  425. <div class="block">Return the <code>Object</code> type of this <code>Option</code>.</div>
  426. <dl>
  427. <dt><span class="paramLabel">Parameters:</span></dt>
  428. <dd><code>opt</code> - the name of the option</dd>
  429. <dt><span class="returnLabel">Returns:</span></dt>
  430. <dd>the type of opt</dd>
  431. </dl>
  432. </li>
  433. </ul>
  434. <a name="getOptionValue-java.lang.String-">
  435. <!-- -->
  436. </a>
  437. <ul class="blockList">
  438. <li class="blockList">
  439. <h4>getOptionValue</h4>
  440. <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;getOptionValue(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</pre>
  441. <div class="block">Retrieve the first argument, if any, of this option.</div>
  442. <dl>
  443. <dt><span class="paramLabel">Parameters:</span></dt>
  444. <dd><code>opt</code> - the name of the option</dd>
  445. <dt><span class="returnLabel">Returns:</span></dt>
  446. <dd>Value of the argument if option is set, and has an argument,
  447. otherwise null.</dd>
  448. </dl>
  449. </li>
  450. </ul>
  451. <a name="getOptionValue-char-">
  452. <!-- -->
  453. </a>
  454. <ul class="blockList">
  455. <li class="blockList">
  456. <h4>getOptionValue</h4>
  457. <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;getOptionValue(char&nbsp;opt)</pre>
  458. <div class="block">Retrieve the first argument, if any, of this option.</div>
  459. <dl>
  460. <dt><span class="paramLabel">Parameters:</span></dt>
  461. <dd><code>opt</code> - the character name of the option</dd>
  462. <dt><span class="returnLabel">Returns:</span></dt>
  463. <dd>Value of the argument if option is set, and has an argument,
  464. otherwise null.</dd>
  465. </dl>
  466. </li>
  467. </ul>
  468. <a name="getOptionValues-java.lang.String-">
  469. <!-- -->
  470. </a>
  471. <ul class="blockList">
  472. <li class="blockList">
  473. <h4>getOptionValues</h4>
  474. <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;getOptionValues(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</pre>
  475. <div class="block">Retrieves the array of values, if any, of an option.</div>
  476. <dl>
  477. <dt><span class="paramLabel">Parameters:</span></dt>
  478. <dd><code>opt</code> - string name of the option</dd>
  479. <dt><span class="returnLabel">Returns:</span></dt>
  480. <dd>Values of the argument if option is set, and has an argument,
  481. otherwise null.</dd>
  482. </dl>
  483. </li>
  484. </ul>
  485. <a name="getOptionValues-char-">
  486. <!-- -->
  487. </a>
  488. <ul class="blockList">
  489. <li class="blockList">
  490. <h4>getOptionValues</h4>
  491. <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;getOptionValues(char&nbsp;opt)</pre>
  492. <div class="block">Retrieves the array of values, if any, of an option.</div>
  493. <dl>
  494. <dt><span class="paramLabel">Parameters:</span></dt>
  495. <dd><code>opt</code> - character name of the option</dd>
  496. <dt><span class="returnLabel">Returns:</span></dt>
  497. <dd>Values of the argument if option is set, and has an argument,
  498. otherwise null.</dd>
  499. </dl>
  500. </li>
  501. </ul>
  502. <a name="getOptionValue-java.lang.String-java.lang.String-">
  503. <!-- -->
  504. </a>
  505. <ul class="blockList">
  506. <li class="blockList">
  507. <h4>getOptionValue</h4>
  508. <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;getOptionValue(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt,
  509. <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>
  510. <div class="block">Retrieve the first argument, if any, of an option.</div>
  511. <dl>
  512. <dt><span class="paramLabel">Parameters:</span></dt>
  513. <dd><code>opt</code> - name of the option</dd>
  514. <dd><code>defaultValue</code> - is the default value to be returned if the option
  515. is not specified</dd>
  516. <dt><span class="returnLabel">Returns:</span></dt>
  517. <dd>Value of the argument if option is set, and has an argument,
  518. otherwise <code>defaultValue</code>.</dd>
  519. </dl>
  520. </li>
  521. </ul>
  522. <a name="getOptionValue-char-java.lang.String-">
  523. <!-- -->
  524. </a>
  525. <ul class="blockList">
  526. <li class="blockList">
  527. <h4>getOptionValue</h4>
  528. <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;getOptionValue(char&nbsp;opt,
  529. <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>
  530. <div class="block">Retrieve the argument, if any, of an option.</div>
  531. <dl>
  532. <dt><span class="paramLabel">Parameters:</span></dt>
  533. <dd><code>opt</code> - character name of the option</dd>
  534. <dd><code>defaultValue</code> - is the default value to be returned if the option
  535. is not specified</dd>
  536. <dt><span class="returnLabel">Returns:</span></dt>
  537. <dd>Value of the argument if option is set, and has an argument,
  538. otherwise <code>defaultValue</code>.</dd>
  539. </dl>
  540. </li>
  541. </ul>
  542. <a name="getOptionProperties-java.lang.String-">
  543. <!-- -->
  544. </a>
  545. <ul class="blockList">
  546. <li class="blockList">
  547. <h4>getOptionProperties</h4>
  548. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;getOptionProperties(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;opt)</pre>
  549. <div class="block">Retrieve the map of values associated to the option. This is convenient
  550. for options specifying Java properties like <tt>-Dparam1=value1
  551. -Dparam2=value2</tt>. The first argument of the option is the key, and
  552. the 2nd argument is the value. If the option has only one argument
  553. (<tt>-Dfoo</tt>) it is considered as a boolean flag and the value is
  554. <tt>"true"</tt>.</div>
  555. <dl>
  556. <dt><span class="paramLabel">Parameters:</span></dt>
  557. <dd><code>opt</code> - name of the option</dd>
  558. <dt><span class="returnLabel">Returns:</span></dt>
  559. <dd>The Properties mapped by the option, never <tt>null</tt>
  560. even if the option doesn't exists</dd>
  561. <dt><span class="simpleTagLabel">Since:</span></dt>
  562. <dd>1.2</dd>
  563. </dl>
  564. </li>
  565. </ul>
  566. <a name="getArgs--">
  567. <!-- -->
  568. </a>
  569. <ul class="blockList">
  570. <li class="blockList">
  571. <h4>getArgs</h4>
  572. <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;getArgs()</pre>
  573. <div class="block">Retrieve any left-over non-recognized options and arguments</div>
  574. <dl>
  575. <dt><span class="returnLabel">Returns:</span></dt>
  576. <dd>remaining items passed in but not parsed as an array</dd>
  577. </dl>
  578. </li>
  579. </ul>
  580. <a name="getArgList--">
  581. <!-- -->
  582. </a>
  583. <ul class="blockList">
  584. <li class="blockList">
  585. <h4>getArgList</h4>
  586. <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;getArgList()</pre>
  587. <div class="block">Retrieve any left-over non-recognized options and arguments</div>
  588. <dl>
  589. <dt><span class="returnLabel">Returns:</span></dt>
  590. <dd>remaining items passed in but not parsed as a <code>List</code>.</dd>
  591. </dl>
  592. </li>
  593. </ul>
  594. <a name="addArg-java.lang.String-">
  595. <!-- -->
  596. </a>
  597. <ul class="blockList">
  598. <li class="blockList">
  599. <h4>addArg</h4>
  600. <pre>protected&nbsp;void&nbsp;addArg(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;arg)</pre>
  601. <div class="block">Add left-over unrecognized option/argument.</div>
  602. <dl>
  603. <dt><span class="paramLabel">Parameters:</span></dt>
  604. <dd><code>arg</code> - the unrecognized option/argument.</dd>
  605. </dl>
  606. </li>
  607. </ul>
  608. <a name="addOption-org.apache.commons.cli.Option-">
  609. <!-- -->
  610. </a>
  611. <ul class="blockList">
  612. <li class="blockList">
  613. <h4>addOption</h4>
  614. <pre>protected&nbsp;void&nbsp;addOption(<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;opt)</pre>
  615. <div class="block">Add an option to the command line. The values of the option are stored.</div>
  616. <dl>
  617. <dt><span class="paramLabel">Parameters:</span></dt>
  618. <dd><code>opt</code> - the processed option</dd>
  619. </dl>
  620. </li>
  621. </ul>
  622. <a name="iterator--">
  623. <!-- -->
  624. </a>
  625. <ul class="blockList">
  626. <li class="blockList">
  627. <h4>iterator</h4>
  628. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&gt;&nbsp;iterator()</pre>
  629. <div class="block">Returns an iterator over the Option members of CommandLine.</div>
  630. <dl>
  631. <dt><span class="returnLabel">Returns:</span></dt>
  632. <dd>an <code>Iterator</code> over the processed <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a>
  633. members of this <a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli"><code>CommandLine</code></a></dd>
  634. </dl>
  635. </li>
  636. </ul>
  637. <a name="getOptions--">
  638. <!-- -->
  639. </a>
  640. <ul class="blockListLast">
  641. <li class="blockList">
  642. <h4>getOptions</h4>
  643. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>[]&nbsp;getOptions()</pre>
  644. <div class="block">Returns an array of the processed <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a>s.</div>
  645. <dl>
  646. <dt><span class="returnLabel">Returns:</span></dt>
  647. <dd>an array of the processed <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a>s.</dd>
  648. </dl>
  649. </li>
  650. </ul>
  651. </li>
  652. </ul>
  653. </li>
  654. </ul>
  655. </div>
  656. </div>
  657. <!-- ========= END OF CLASS DATA ========= -->
  658. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  659. <div class="bottomNav"><a name="navbar.bottom">
  660. <!-- -->
  661. </a>
  662. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  663. <a name="navbar.bottom.firstrow">
  664. <!-- -->
  665. </a>
  666. <ul class="navList" title="Navigation">
  667. <li><a href="../../../../org/apache/commons/cli/package-summary.html">Package</a></li>
  668. <li class="navBarCell1Rev">Class</li>
  669. <li><a href="class-use/CommandLine.html">Use</a></li>
  670. <li><a href="package-tree.html">Tree</a></li>
  671. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  672. <li><a href="../../../../index-all.html">Index</a></li>
  673. <li><a href="../../../../help-doc.html">Help</a></li>
  674. </ul>
  675. </div>
  676. <div class="subNav">
  677. <ul class="navList">
  678. <li><a href="../../../../org/apache/commons/cli/BasicParser.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  679. <li><a href="../../../../org/apache/commons/cli/CommandLine.Builder.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  680. </ul>
  681. <ul class="navList">
  682. <li><a href="../../../../index.html?org/apache/commons/cli/CommandLine.html" target="_top">Frames</a></li>
  683. <li><a href="CommandLine.html" target="_top">No&nbsp;Frames</a></li>
  684. </ul>
  685. <ul class="navList" id="allclasses_navbar_bottom">
  686. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  687. </ul>
  688. <div>
  689. <script type="text/javascript"><!--
  690. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  691. if(window==top) {
  692. allClassesLink.style.display = "block";
  693. }
  694. else {
  695. allClassesLink.style.display = "none";
  696. }
  697. //-->
  698. </script>
  699. </div>
  700. <div>
  701. <ul class="subNavList">
  702. <li>Summary:&nbsp;</li>
  703. <li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
  704. <li>Field&nbsp;|&nbsp;</li>
  705. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  706. <li><a href="#method.summary">Method</a></li>
  707. </ul>
  708. <ul class="subNavList">
  709. <li>Detail:&nbsp;</li>
  710. <li>Field&nbsp;|&nbsp;</li>
  711. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  712. <li><a href="#method.detail">Method</a></li>
  713. </ul>
  714. </div>
  715. <a name="skip.navbar.bottom">
  716. <!-- -->
  717. </a></div>
  718. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  719. <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>
  720. </body>
  721. </html>