Interface Condition

All Superinterfaces:
org.refcodes.component.Resetable, Syntaxable, SyntaxUsage
All Known Implementing Classes:
AbstractCondition, AndCondition, OptionalCondition, OptionConditionFacade, OrCondition, XorCondition

public interface Condition
extends Syntaxable
The Condition interface represents a node in the command line arguments syntax tree; simply extending the Syntaxable interface and adding the functionality of providing access to the added Operands (leafs). In future extensions, a Condition might provide access to the child Syntaxable elements contained in a Condition instance. As of the current findings, access to the children of the Condition node is not required and would make the interface unnecessarily complicated.
  • Method Details

    • toOperands

      List<? extends Operand<?>> toOperands()
      Traverses the hierarchy of Conditions and collects all therein found Operands and sub-types such as the Flag or the Option. This is most useful when creating a list of Options, Flages and Operands when printing out detailed help.
      Returns:
      The according Operand elements.