> > > OptionBuilder.isMandatory() returns an OptionBuilder. Normally "is" > >methods > > > return a boolean. The factory methods in this class (and > >ArgumentBuilder) > > > should probably all start with "create" for clarity (ie. > >createWithChild()). > >Yeah I know what you're saying. What would you name the required method > >though? > > I'm not sure what the OptionBuilder returned from > OptionBuilder.isMandatory() is supposed to represent/do. Maybe > createRequired() would work?
The builders are to help the building of complex objects in a verbose manner thus eliminating the confusion that arises due to methods with many parameters of similar type. So if I wanted to create an option 'a' that is required: OptionBuilder builder = new OptionBuilder(); Option a = builder.isRequired().create("a"); If you wanted to say that Option 'a' also has child options: Option a = builder.isRequired() .withChildren(childOptions) .create("a"); Does that explain the process? -John K --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]