org.jcommando
Class Grouping

java.lang.Object
  extended byorg.jcommando.Grouping
Direct Known Subclasses:
And, Not, Or, Xor

public abstract class Grouping
extends java.lang.Object

Author:
Brett Wooldridge

Field Summary
protected  java.util.List groupings
           
protected  java.lang.String id
           
protected  java.util.Set options
           
 
Constructor Summary
Grouping()
          Default constructor.
 
Method Summary
 void addOption(Option option)
          Add an option to this grouping.
 java.util.List getGroupings()
          Get the child "Groupings" of this Grouping.
 java.util.Set getOptions()
          Get the options in this Grouping.
abstract  boolean satisfied(java.util.Set optionSet)
          Abstract method implemented by subclasses of Grouping that tests whether all the requirements of the grouping have been satisfied by the supplied options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

protected java.util.Set options

groupings

protected java.util.List groupings

id

protected java.lang.String id
Constructor Detail

Grouping

public Grouping()
Default constructor.

Method Detail

addOption

public void addOption(Option option)
Add an option to this grouping.

Parameters:
option - the option to add

getGroupings

public java.util.List getGroupings()
Get the child "Groupings" of this Grouping.

Returns:
Returns the groupings.

getOptions

public java.util.Set getOptions()
Get the options in this Grouping.

Returns:
Returns the options.

satisfied

public abstract boolean satisfied(java.util.Set optionSet)
Abstract method implemented by subclasses of Grouping that tests whether all the requirements of the grouping have been satisfied by the supplied options.

Parameters:
optionSet - the set of options parsed from the command-line
Returns:
true if the grouping requirement is satisfied.