net.dpml.cli.builder

Class GroupBuilder


public class GroupBuilder
extends java.lang.Object

Builds Group instances.
Version:
@PROJECT-VERSION@
Author:
@PUBLISHER-NAME@

Constructor Summary

GroupBuilder()
Creates a new GroupBuilder

Method Summary

Group
create()
Creates a new Group instance
GroupBuilder
reset()
Resets the builder
GroupBuilder
withDescription(String newDescription)
Use this option description
GroupBuilder
withMaximum(int newMaximum)
A valid group requires at most this many options present
GroupBuilder
withMinimum(int newMinimum)
A valid group requires at least this many options present
GroupBuilder
withName(String newName)
Use this option name
GroupBuilder
withOption(Option option)
Add this option to the group

Constructor Details

GroupBuilder

public GroupBuilder()
Creates a new GroupBuilder

Method Details

create

public Group create()
Creates a new Group instance
Returns:
the new Group instance

reset

public GroupBuilder reset()
Resets the builder
Returns:
this builder

withDescription

public GroupBuilder withDescription(String newDescription)
Use this option description
Parameters:
newDescription - the description to use
Returns:
this builder

withMaximum

public GroupBuilder withMaximum(int newMaximum)
A valid group requires at most this many options present
Parameters:
newMaximum - the maximum Options allowed
Returns:
this builder

withMinimum

public GroupBuilder withMinimum(int newMinimum)
A valid group requires at least this many options present
Parameters:
newMinimum - the minimum Options required
Returns:
this builder

withName

public GroupBuilder withName(String newName)
Use this option name
Parameters:
newName - the name to use
Returns:
this builder

withOption

public GroupBuilder withOption(Option option)
Add this option to the group
Parameters:
option - the Option to add
Returns:
this builder