commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Keyes <>
Subject [CLI] parse methods with fromIndex and toIndex
Date Mon, 24 Jun 2002 23:18:07 GMT

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

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:   <>
For additional commands, e-mail: <>

View raw message