> The proposed release is available at:
> http://people.apache.org/~roxspring/cli/

Rob,

I've been playing with the CLI2 stuff now.
Great stuff! ...but something I found confusing

Let's say I create my option like this:

      final Set set = new HashSet();
      set.add("a1");
      set.add("a2");
      set.add("a3");

      final Option oOption1 =
            oBuilder
            .withDescription(Messages.getString("Main.cli.option." +
CommandlineOption.ALGORITHM))
            .withRequired(true)
            .withArgument(
                 aBuilder
                 .withMinimum(1)
                 .withMaximum(1)
                 .withValidator(new EnumValidator(set))
                 .create())
             .withLongName(CommandlineOption.ALGORITHM)
             .create();

And then later want to get the value from it:

  final String v =
    (String) cmd.getValue("--" + CommandlineOption.ALGORITHM);


I find adding "--" quite inconvenient. Why here this prefix?

Also I am wondering what you think about adding some
getValuesAsXXX functions. Alway having an explicit cast
is kind of annoying.

Or am I missing something?

cheers
--
Torsten

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to