@@ -98,7 +98,10 @@ Collection<OptionGroup> getOptionGroups()
9898
9999 /**
100100 * Add an option that only contains a short name.
101+ *
102+ * <p>
101103 * The option does not take an argument.
104+ * </p>
102105 *
103106 * @param opt Short single-character name of the option.
104107 * @param description Self-documenting description
@@ -113,7 +116,10 @@ public Options addOption(String opt, String description)
113116
114117 /**
115118 * Add an option that only contains a short-name.
119+ *
120+ * <p>
116121 * It may be specified as requiring an argument.
122+ * </p>
117123 *
118124 * @param opt Short single-character name of the option.
119125 * @param hasArg flag signally if an argument is required after this option
@@ -128,7 +134,10 @@ public Options addOption(String opt, boolean hasArg, String description)
128134
129135 /**
130136 * Add an option that contains a short-name and a long-name.
137+ *
138+ * <p>
131139 * It may be specified as requiring an argument.
140+ * </p>
132141 *
133142 * @param opt Short single-character name of the option.
134143 * @param longOpt Long multi-character name of the option.
@@ -144,8 +153,18 @@ public Options addOption(String opt, String longOpt, boolean hasArg, String desc
144153
145154 /**
146155 * Add an option that contains a short-name and a long-name.
147- * This option is set as required.
148- * It may be specified as requiring an argument.
156+ *
157+ * <p>
158+ * The added option is set as required. It may be specified as requiring an argument. This method is a shortcut for:
159+ * </p>
160+ *
161+ * <pre>
162+ * <code>
163+ * Options option = new Option(opt, longOpt, hasArg, description);
164+ * option.setRequired(true);
165+ * options.add(option);
166+ * </code>
167+ * </pre>
149168 *
150169 * @param opt Short single-character name of the option.
151170 * @param longOpt Long multi-character name of the option.
@@ -224,7 +243,10 @@ public List getRequiredOptions()
224243
225244 /**
226245 * Retrieve the {@link Option} matching the long or short name specified.
246+ *
247+ * <p>
227248 * The leading hyphens in the name are ignored (up to 2).
249+ * </p>
228250 *
229251 * @param opt short or long name of the {@link Option}
230252 * @return the option represented by opt
@@ -314,10 +336,9 @@ public boolean hasShortOption(String opt)
314336
315337 /**
316338 * Returns the OptionGroup the <code>opt</code> belongs to.
317- * @param opt the option whose OptionGroup is being queried.
318339 *
319- * @return the OptionGroup if <code>opt</code> is part
320- * of an OptionGroup, otherwise return null
340+ * @param opt the option whose OptionGroup is being queried.
341+ * @return the OptionGroup if <code>opt</code> is part of an OptionGroup, otherwise return null
321342 */
322343 public OptionGroup getOptionGroup (Option opt )
323344 {
0 commit comments