|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.cli2.builder.GroupBuilder
public class GroupBuilder
Builds Group instances
Field Summary | |
---|---|
private java.lang.String |
description
|
private int |
maximum
|
private int |
minimum
|
private java.lang.String |
name
|
private java.util.List |
options
|
Constructor Summary | |
---|---|
GroupBuilder()
Creates a new GroupBuilder |
Method Summary | |
---|---|
Group |
create()
Creates a new Group instance |
GroupBuilder |
reset()
Resets the builder |
GroupBuilder |
withDescription(java.lang.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(java.lang.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 |
Field Detail |
---|
private java.lang.String name
private java.lang.String description
private java.util.List options
private int minimum
private int maximum
Constructor Detail |
---|
public GroupBuilder()
Method Detail |
---|
public Group create()
public GroupBuilder reset()
public GroupBuilder withDescription(java.lang.String newDescription)
newDescription
- the description to use
public GroupBuilder withName(java.lang.String newName)
newName
- the name to use
public GroupBuilder withMinimum(int newMinimum)
newMinimum
- the minimum Options required
public GroupBuilder withMaximum(int newMaximum)
newMaximum
- the maximum Options allowed
public GroupBuilder withOption(Option option)
option
- the Option to add
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |