Claudenw commented on code in PR #334:
URL: https://github.com/apache/commons-cli/pull/334#discussion_r1838997591
##########
src/main/java/org/apache/commons/cli/CommandLine.java:
##########
@@ -691,6 +692,203 @@ public <T> T getParsedOptionValue(final String opt, final
T defaultValue) throws
return getParsedOptionValue(resolveOption(opt), defaultValue);
}
+ /**
+ * Gets a version of this {@code Option} converted to an array of a
particular type.
+ *
+ * @param opt the name of the option.
+ * @param <T> The array type for the return value.
+ * @return the values parsed into an array of objects.
+ * @throws ParseException if there are problems turning the option value
into the desired type
+ * @see PatternOptionBuilder
+ * @since 1.10.0
+ */
+ public <T> T[] getParsedOptionValues(final char opt) throws ParseException
{
Review Comment:
I am following the pattern used in the class. Methods from earlier versions
used `opt`, I elected to do the same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]