Skip to content

Commit cbb7227

Browse files
committed
Normalize Javadoc for getters.
1 parent d78ed6b commit cbb7227

8 files changed

Lines changed: 34 additions & 32 deletions

File tree

src/main/java/org/apache/commons/cli/AmbiguousOptionException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public AmbiguousOptionException(final String option, final Collection<String> ma
7272
}
7373

7474
/**
75-
* Returns the options matching the partial name.
75+
* Gets the options matching the partial name.
7676
*
7777
* @return a collection of options matching the name
7878
*/

src/main/java/org/apache/commons/cli/CommandLine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public Properties getOptionProperties(final String opt) {
218218
}
219219

220220
/**
221-
* Returns an array of the processed {@link Option}s.
221+
* Gets an array of the processed {@link Option}s.
222222
*
223223
* @return an array of the processed {@link Option}s.
224224
*/

src/main/java/org/apache/commons/cli/DefaultParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private String getLongPrefix(final String token) {
146146
}
147147

148148
/**
149-
* Returns a list of matching option strings for the given token, depending on the selected partial matching policy.
149+
* Gets a list of matching option strings for the given token, depending on the selected partial matching policy.
150150
*
151151
* @param token the token (may contain leading dashes)
152152
* @return the list of matching option strings or an empty list if no matching option could be found

src/main/java/org/apache/commons/cli/HelpFormatter.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ protected int findWrapPos(final String text, final int width, final int startPos
312312
}
313313

314314
/**
315-
* Returns the 'argName'.
315+
* Gets the 'argName'.
316316
*
317317
* @return the 'argName'
318318
*/
@@ -321,7 +321,7 @@ public String getArgName() {
321321
}
322322

323323
/**
324-
* Returns the 'descPadding'.
324+
* Gets the 'descPadding'.
325325
*
326326
* @return the 'descPadding'
327327
*/
@@ -330,7 +330,7 @@ public int getDescPadding() {
330330
}
331331

332332
/**
333-
* Returns the 'leftPadding'.
333+
* Gets the 'leftPadding'.
334334
*
335335
* @return the 'leftPadding'
336336
*/
@@ -339,7 +339,7 @@ public int getLeftPadding() {
339339
}
340340

341341
/**
342-
* Returns the 'longOptPrefix'.
342+
* Gets the 'longOptPrefix'.
343343
*
344344
* @return the 'longOptPrefix'
345345
*/
@@ -348,7 +348,7 @@ public String getLongOptPrefix() {
348348
}
349349

350350
/**
351-
* Returns the separator displayed between a long option and its value.
351+
* Gets the separator displayed between a long option and its value.
352352
*
353353
* @return the separator
354354
* @since 1.3
@@ -358,7 +358,7 @@ public String getLongOptSeparator() {
358358
}
359359

360360
/**
361-
* Returns the 'newLine'.
361+
* Gets the 'newLine'.
362362
*
363363
* @return the 'newLine'
364364
*/
@@ -378,7 +378,7 @@ public Comparator<Option> getOptionComparator() {
378378
}
379379

380380
/**
381-
* Returns the 'optPrefix'.
381+
* Gets the 'optPrefix'.
382382
*
383383
* @return the 'optPrefix'
384384
*/
@@ -387,7 +387,7 @@ public String getOptPrefix() {
387387
}
388388

389389
/**
390-
* Returns the 'syntaxPrefix'.
390+
* Gets the 'syntaxPrefix'.
391391
*
392392
* @return the 'syntaxPrefix'
393393
*/
@@ -396,7 +396,7 @@ public String getSyntaxPrefix() {
396396
}
397397

398398
/**
399-
* Returns the 'width'.
399+
* Gets the 'width'.
400400
*
401401
* @return the 'width'
402402
*/

src/main/java/org/apache/commons/cli/MissingOptionException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public MissingOptionException(final String message) {
7373
}
7474

7575
/**
76-
* Returns the list of options or option groups missing in the command line parsed.
76+
* Gets the list of options or option groups missing in the command line parsed.
7777
*
7878
* @return the missing options, consisting of String instances for simple options, and OptionGroup instances for
7979
* required option groups.

src/main/java/org/apache/commons/cli/Option.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ public String getArgName() {
493493
}
494494

495495
/**
496-
* Returns the number of argument values this Option can take.
496+
* Gets the number of argument values this Option can take.
497497
*
498498
* <p>
499499
* A value equal to the constant {@link #UNINITIALIZED} (= -1) indicates the number of arguments has not been specified.
@@ -510,7 +510,7 @@ public int getArgs() {
510510
}
511511

512512
/**
513-
* Retrieve the self-documenting description of this Option
513+
* Gets the self-documenting description of this Option
514514
*
515515
* @return The string description of this option
516516
*/
@@ -519,7 +519,7 @@ public String getDescription() {
519519
}
520520

521521
/**
522-
* Returns the id of this Option. This is only set when the Option shortOpt is a single character. This is used for
522+
* Gets the id of this Option. This is only set when the Option shortOpt is a single character. This is used for
523523
* switch statements.
524524
*
525525
* @return the id of this Option
@@ -529,7 +529,7 @@ public int getId() {
529529
}
530530

531531
/**
532-
* Returns the 'unique' Option identifier.
532+
* Gets the 'unique' Option identifier.
533533
*
534534
* @return the 'unique' Option identifier
535535
*/
@@ -539,7 +539,7 @@ String getKey() {
539539
}
540540

541541
/**
542-
* Retrieve the long name of this Option.
542+
* Gets the long name of this Option.
543543
*
544544
* @return Long name of this option, or null, if there is no long name
545545
*/
@@ -548,7 +548,7 @@ public String getLongOpt() {
548548
}
549549

550550
/**
551-
* Retrieve the name of this Option.
551+
* Gets the name of this Option.
552552
*
553553
* It is this String which can be used with {@link CommandLine#hasOption(String opt)} and
554554
* {@link CommandLine#getOptionValue(String opt)} to check for existence and argument.
@@ -560,7 +560,7 @@ public String getOpt() {
560560
}
561561

562562
/**
563-
* Retrieve the type of this Option.
563+
* Gets the type of this Option.
564564
*
565565
* @return The type of this option
566566
*/
@@ -569,7 +569,7 @@ public Object getType() {
569569
}
570570

571571
/**
572-
* Returns the specified value of this Option or {@code null} if there is no value.
572+
* Gets the specified value of this Option or {@code null} if there is no value.
573573
*
574574
* @return the value/first value of this Option or {@code null} if there is no value.
575575
*/
@@ -578,7 +578,7 @@ public String getValue() {
578578
}
579579

580580
/**
581-
* Returns the specified value of this Option or {@code null} if there is no value.
581+
* Gets the specified value of this Option or {@code null} if there is no value.
582582
*
583583
* @param index The index of the value to be returned.
584584
*
@@ -591,7 +591,7 @@ public String getValue(final int index) throws IndexOutOfBoundsException {
591591
}
592592

593593
/**
594-
* Returns the value/first value of this Option or the {@code defaultValue} if there is no value.
594+
* Gets the value/first value of this Option or the {@code defaultValue} if there is no value.
595595
*
596596
* @param defaultValue The value to be returned if there is no value.
597597
*
@@ -604,7 +604,7 @@ public String getValue(final String defaultValue) {
604604
}
605605

606606
/**
607-
* Return the values of this Option as a String array or null if there are no values
607+
* Gets the values of this Option as a String array or null if there are no values
608608
*
609609
* @return the values of this Option as a String array or null if there are no values
610610
*/
@@ -613,7 +613,7 @@ public String[] getValues() {
613613
}
614614

615615
/**
616-
* Returns the value separator character.
616+
* Gets the value separator character.
617617
*
618618
* @return the value separator character.
619619
*/
@@ -622,6 +622,8 @@ public char getValueSeparator() {
622622
}
623623

624624
/**
625+
* Gets the values of this Option as a List or null if there are no values.
626+
*
625627
* @return the values of this Option as a List or null if there are no values
626628
*/
627629
public List<String> getValuesList() {

src/main/java/org/apache/commons/cli/OptionGroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public String getSelected() {
7777
}
7878

7979
/**
80-
* Returns whether this option group is required.
80+
* Tests whether this option group is required.
8181
*
8282
* @return whether this option group is required
8383
*/

src/main/java/org/apache/commons/cli/Options.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public Options addRequiredOption(final String opt, final String longOpt, final b
187187
}
188188

189189
/**
190-
* Returns the options with a long name starting with the name specified.
190+
* Gets the options with a long name starting with the name specified.
191191
*
192192
* @param opt the partial name of the option
193193
* @return the options matching the partial name specified, or an empty list if none matches
@@ -213,7 +213,7 @@ public List<String> getMatchingOptions(String opt) {
213213
}
214214

215215
/**
216-
* Retrieve the {@link Option} matching the long or short name specified.
216+
* Gets the {@link Option} matching the long or short name specified.
217217
*
218218
* <p>
219219
* The leading hyphens in the name are ignored (up to 2).
@@ -233,7 +233,7 @@ public Option getOption(String opt) {
233233
}
234234

235235
/**
236-
* Returns the OptionGroup the {@code opt} belongs to.
236+
* Gets the OptionGroup the {@code opt} belongs to.
237237
*
238238
* @param opt the option whose OptionGroup is being queried.
239239
* @return the OptionGroup if {@code opt} is part of an OptionGroup, otherwise return null
@@ -243,7 +243,7 @@ public OptionGroup getOptionGroup(final Option opt) {
243243
}
244244

245245
/**
246-
* Lists the OptionGroups that are members of this Options instance.
246+
* Gets the OptionGroups that are members of this Options instance.
247247
*
248248
* @return a Collection of OptionGroup instances.
249249
*/
@@ -252,7 +252,7 @@ Collection<OptionGroup> getOptionGroups() {
252252
}
253253

254254
/**
255-
* Retrieve a read-only list of options in this set
255+
* Gets a read-only list of options in this set
256256
*
257257
* @return read-only Collection of {@link Option} objects in this descriptor
258258
*/
@@ -261,7 +261,7 @@ public Collection<Option> getOptions() {
261261
}
262262

263263
/**
264-
* Returns the required options.
264+
* Gets the required options.
265265
*
266266
* @return read-only List of required options
267267
*/

0 commit comments

Comments
 (0)