@@ -65,10 +65,10 @@ public Options() {
6565 }
6666
6767 /**
68- * Adds an option instance
68+ * Adds an option instance.
6969 *
70- * @param opt the option that is to be added
71- * @return the resulting Options instance
70+ * @param opt the option that is to be added.
71+ * @return the resulting Options instance.
7272 */
7373 public Options addOption (final Option opt ) {
7474 final String key = opt .getKey ();
@@ -94,9 +94,9 @@ public Options addOption(final Option opt) {
9494 * </p>
9595 *
9696 * @param opt Short single-character name of the option.
97- * @param hasArg flag signaling if an argument is required after this option
98- * @param description Self-documenting description
99- * @return the resulting Options instance
97+ * @param hasArg flag signaling if an argument is required after this option.
98+ * @param description Self-documenting description.
99+ * @return the resulting Options instance.
100100 */
101101 public Options addOption (final String opt , final boolean hasArg , final String description ) {
102102 addOption (opt , null , hasArg , description );
@@ -110,8 +110,8 @@ public Options addOption(final String opt, final boolean hasArg, final String de
110110 * </p>
111111 *
112112 * @param opt Short single-character name of the option.
113- * @param description Self-documenting description
114- * @return the resulting Options instance
113+ * @param description Self-documenting description.
114+ * @return the resulting Options instance.
115115 * @since 1.3
116116 */
117117 public Options addOption (final String opt , final String description ) {
@@ -127,9 +127,9 @@ public Options addOption(final String opt, final String description) {
127127 *
128128 * @param opt Short single-character name of the option.
129129 * @param longOpt Long multi-character name of the option.
130- * @param hasArg flag signaling if an argument is required after this option
131- * @param description Self-documenting description
132- * @return the resulting Options instance
130+ * @param hasArg flag signaling if an argument is required after this option.
131+ * @param description Self-documenting description.
132+ * @return the resulting Options instance.
133133 */
134134 public Options addOption (final String opt , final String longOpt , final boolean hasArg , final String description ) {
135135 addOption (new Option (opt , longOpt , hasArg , description ));
@@ -139,8 +139,8 @@ public Options addOption(final String opt, final String longOpt, final boolean h
139139 /**
140140 * Adds the specified option group.
141141 *
142- * @param group the OptionGroup that is to be added
143- * @return the resulting Options instance
142+ * @param group the OptionGroup that is to be added.
143+ * @return the resulting Options instance.
144144 */
145145 public Options addOptionGroup (final OptionGroup group ) {
146146 if (group .isRequired ()) {
@@ -159,7 +159,7 @@ public Options addOptionGroup(final OptionGroup group) {
159159
160160 /**
161161 * Adds options to this option. If any Option in {@code options} already exists
162- * in this Options an IllegalArgumentException is thrown
162+ * in this Options an IllegalArgumentException is thrown.
163163 *
164164 * @param options the options to add.
165165 * @return The resulting Options instance.
@@ -191,9 +191,9 @@ public Options addOptions(final Options options) {
191191 *
192192 * @param opt Short single-character name of the option.
193193 * @param longOpt Long multi-character name of the option.
194- * @param hasArg flag signaling if an argument is required after this option
195- * @param description Self-documenting description
196- * @return the resulting Options instance
194+ * @param hasArg flag signaling if an argument is required after this option.
195+ * @param description Self-documenting description.
196+ * @return the resulting Options instance.
197197 * @since 1.4
198198 */
199199 public Options addRequiredOption (final String opt , final String longOpt , final boolean hasArg , final String description ) {
@@ -206,8 +206,8 @@ public Options addRequiredOption(final String opt, final String longOpt, final b
206206 /**
207207 * Gets the options with a long name starting with the name specified.
208208 *
209- * @param opt the partial name of the option
210- * @return the options matching the partial name specified, or an empty list if none matches
209+ * @param opt the partial name of the option.
210+ * @return the options matching the partial name specified, or an empty list if none matches.
211211 * @since 1.3
212212 */
213213 public List <String > getMatchingOptions (final String opt ) {
@@ -231,8 +231,8 @@ public List<String> getMatchingOptions(final String opt) {
231231 * The leading hyphens in the name are ignored (up to 2).
232232 * </p>
233233 *
234- * @param opt short or long name of the {@link Option}
235- * @return the option represented by opt
234+ * @param opt short or long name of the {@link Option}.
235+ * @return the option represented by opt.
236236 */
237237 public Option getOption (final String opt ) {
238238 final String clean = Util .stripLeadingHyphens (opt );
@@ -244,7 +244,7 @@ public Option getOption(final String opt) {
244244 * Gets the OptionGroup the {@code opt} belongs to.
245245 *
246246 * @param opt the option whose OptionGroup is being queried.
247- * @return the OptionGroup if {@code opt} is part of an OptionGroup, otherwise return null
247+ * @return the OptionGroup if {@code opt} is part of an OptionGroup, otherwise return null.
248248 */
249249 public OptionGroup getOptionGroup (final Option opt ) {
250250 return optionGroups .get (opt .getKey ());
@@ -256,18 +256,18 @@ public OptionGroup getOptionGroup(final Option opt) {
256256 * @return a Collection of OptionGroup instances.
257257 */
258258 Collection <OptionGroup > getOptionGroups () {
259- /* The optionGroups map will have duplicates in the values() results. We
260- * use the HashSet to filter out duplicates and return a collection of
261- * OpitonGroup. The decision to return a Collection rather than a set
262- * was probably to keep symmetry with the getOptions() method.
263- */
259+
260+ // The optionGroups map will have duplicates in the values() results. We
261+ // use the HashSet to filter out duplicates and return a collection of
262+ // OpitonGroup. The decision to return a Collection rather than a set
263+ // was probably to keep symmetry with the getOptions() method.
264264 return new HashSet <>(optionGroups .values ());
265265 }
266266
267267 /**
268- * Gets a read-only list of options in this set
268+ * Gets a read-only list of options in this set.
269269 *
270- * @return read-only Collection of {@link Option} objects in this descriptor
270+ * @return read-only Collection of {@link Option} objects in this descriptor.
271271 */
272272 public Collection <Option > getOptions () {
273273 return Collections .unmodifiableCollection (helpOptions ());
@@ -276,7 +276,7 @@ public Collection<Option> getOptions() {
276276 /**
277277 * Gets the required options.
278278 *
279- * @return read-only List of required options
279+ * @return read-only List of required options.
280280 */
281281 public List <?> getRequiredOptions () {
282282 return Collections .unmodifiableList (requiredOpts );
@@ -285,8 +285,8 @@ public List<?> getRequiredOptions() {
285285 /**
286286 * Tests whether the named {@link Option} is a member of this {@link Options}.
287287 *
288- * @param opt long name of the {@link Option}
289- * @return true if the named {@link Option} is a member of this {@link Options}
288+ * @param opt long name of the {@link Option}.
289+ * @return true if the named {@link Option} is a member of this {@link Options}.
290290 * @since 1.3
291291 */
292292 public boolean hasLongOption (final String opt ) {
@@ -296,8 +296,8 @@ public boolean hasLongOption(final String opt) {
296296 /**
297297 * Tests whether the named {@link Option} is a member of this {@link Options}.
298298 *
299- * @param opt short or long name of the {@link Option}
300- * @return true if the named {@link Option} is a member of this {@link Options}
299+ * @param opt short or long name of the {@link Option}.
300+ * @return true if the named {@link Option} is a member of this {@link Options}.
301301 */
302302 public boolean hasOption (final String opt ) {
303303 final String clean = Util .stripLeadingHyphens (opt );
@@ -307,8 +307,8 @@ public boolean hasOption(final String opt) {
307307 /**
308308 * Tests whether the named {@link Option} is a member of this {@link Options}.
309309 *
310- * @param opt short name of the {@link Option}
311- * @return true if the named {@link Option} is a member of this {@link Options}
310+ * @param opt short name of the {@link Option}.
311+ * @return true if the named {@link Option} is a member of this {@link Options}.
312312 * @since 1.3
313313 */
314314 public boolean hasShortOption (final String opt ) {
@@ -319,7 +319,7 @@ public boolean hasShortOption(final String opt) {
319319 /**
320320 * Returns the Options for use by the HelpFormatter.
321321 *
322- * @return the List of Options
322+ * @return the List of Options.
323323 */
324324 List <Option > helpOptions () {
325325 return new ArrayList <>(shortOpts .values ());
@@ -328,7 +328,7 @@ List<Option> helpOptions() {
328328 /**
329329 * Dump state, suitable for debugging.
330330 *
331- * @return Stringified form of this object
331+ * @return Stringified form of this object.
332332 */
333333 @ Override
334334 public String toString () {
0 commit comments