cbeust/jcommander — pull request #89 by angusws (2011-11-10 18:20:27+00:00)
Title: Tidied up comma-separated argument functionality of jcommander.

Hi Cedric,

Further to our discussion last week I've re-written how jcommander handles comma-separated arguments. I've added a boolean -list option to the Parameter annotation which defaults to false. If set to true then JCommander will use the specified converter to generate a java.util.List object with each element parsed using the class specified in converter. See the commit message/code for more details. If you'd rather have it implemented some other way give me a shout.

For example:
@Parameter(..... converter = BigDecimalConverter.class, list = true) will generate a List by parsing each element from the user input "123.45, 67.89" as BigDecimal objects.

Commas can be backslash-escaped if required within an individual List element.

Thanks
Angus