Class XorCondition

All Implemented Interfaces:
Condition, Constituent, Synopsisable, org.refcodes.mixin.DescriptionAccessor, org.refcodes.mixin.Resetable, org.refcodes.mixin.Schemable<CliSchema>
Direct Known Subclasses:
CasesCondition

public class XorCondition extends AbstractCondition implements Condition
An XorCondition represents a list of Condition (Constituent) instances of which only one is allowed to be parsed successfully when the Constituent.parseArgs(String[], String[], CliContext) methods are invoked. The command line arguments syntax { -a ^ -b ^ -c } specifies that only "-a", only "-b" or only "-c" must be set. In case more then one is set or none, then the XorCondition will terminate the parseArgs(String[], String[], CliContext) method with an exception.