net.dpml.cli.builder
Class GroupBuilder

java.lang.Object
  extended bynet.dpml.cli.builder.GroupBuilder

public class GroupBuilder
extends Object

Builds Group instances.

Version:
1.0.0
Author:
Digital Product Meta Library

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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupBuilder

public GroupBuilder()
Creates a new GroupBuilder

Method Detail

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

withName

public GroupBuilder withName(String newName)
Use this option name

Parameters:
newName - the name to use
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

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

withOption

public GroupBuilder withOption(Option option)
Add this option to the group

Parameters:
option - the Option to add
Returns:
this builder