You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by John Keyes <jb...@mac.com> on 2002/06/25 01:18:07 UTC

[CLI] parse methods with fromIndex and toIndex

Hi,

There are some parse methods on Options that accept two
int parameters, fromIndex and toIndex.  These parameters
are not used in the code.  Can someone let me know why
they are there?  I don't see the point in providing
the user with the ability to decide from what point they
should start processing the arguments and at what point
they should stop processing them.  Can someone provide
a use case where this would be beneficial.  If there is
no concrete reason for keeping this I would like to remove
them.

I'm +1 for this.

The reason I ask is because it will mean that all parser
implementations will have to implement these methods.

The CommandLineParser interface currently takes a
java.util.List parameter for the arguments.  I think it
is more intuitive that the parameter is a String array,
as this makes more sense from a users and from a
parser developers point of view (though I doubt there
will be many of these).  The individual parsers can then
decide whether to convert the array into a list.  This
will be a low impact change.

I'm +1 for this also.

-John K


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>