Still, the original poster had a point - isMandatory would typicallyI accept the point that isXXX should return boolean. I will try to think of
return a boolean, whereas setMandatory would be used for setting the
option. In my code, using CLI 1.0, I've been using isRequired(true) to
specify a required option. The true is not necessary, but makes the point
that I'm setting something, as opposed to getting the value. I think
requiring that usage might make things a bit clearer, perhaps deprecating
the old methodology.
a better name for the method and also make it take a boolean parameter
to emphasize that the method is indeed setting some state.
I have modified it to required to try to keep it more consistent with 1.0.As for the mandatory vs. required battle, I have no preference - they both state what they do in clear language.
As you say its the name is self-explanatory..
Thanks, -John K
- - - - - - - - - - - - - - - - - - - - - - - Jakarta Commons CLI http://jakarta.apache.org/commons/cli
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
