Class XorCondition

java.lang.Object
org.refcodes.cli.AbstractCondition
org.refcodes.cli.XorCondition
All Implemented Interfaces:
Condition, MatchCountAccessor, Synopsisable, Term, org.refcodes.exception.ExceptionAccessor<ArgsSyntaxException>, org.refcodes.graphical.VisibleAccessor, org.refcodes.graphical.VisibleAccessor.VisibleBuilder<Term>, org.refcodes.graphical.VisibleAccessor.VisibleMutator, org.refcodes.graphical.VisibleAccessor.VisibleProperty, org.refcodes.mixin.ChildrenAccessor<Term[]>, org.refcodes.mixin.DescriptionAccessor, org.refcodes.mixin.Resetable, org.refcodes.schema.Schemable
Direct Known Subclasses:
CasesCondition

public class XorCondition extends AbstractCondition
An XorCondition represents a list of Condition (Term) instances of which only one is allowed to be parsed successfully when the Term.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.