- labels: 1083579 --> old-gridshell
Yes, that is something we have considered, but it is more of a nicety at this point. Feel free to create a low priority bug for it.
On Tue, Apr 8, 2008 at 3:17 AM, Gregor von Lazewski <laszewski@gmail.com> wrote:
I see lots of calls such as:
Argument workflowobjectArg =
+ abuilder
+ .withName("workflowobject")
+ .withMinimum(1)
+ .withMaximum(1)
+ .create();
Maybe you benefit from creating a helper function/class
Argument SimpleArgument (String name, String shortname, boolean required)
....
if requred {
minimum = 1
maximum = 1
}
Argument arg = null
if (shortname == null) {
arg = abuilder
+ .withName(name)
+ .withMinimum(minimum)
+ .withMaximum(maximum)
+ .create();
else {
arg = abuilder
+ .withName(name)
+ .withMinimum(minimum)
+ .withMaximum(maximum)
.withShortName(shortname)
+ .create();
}
return arg
tahn you can save tons of lines and make the program
boolean REQUIRED = TRUE
Argument workflowobjectArg = SimpleArgument("workflowobject", null, REQUIRED);
....
variations of that may be beneficial.