Package org.refcodes.console
Interface Condition
-
- All Superinterfaces:
org.refcodes.component.Resetable
,Syntaxable
,SyntaxUsage
- All Known Implementing Classes:
AbstractCondition
,AndCondition
,OptionalCondition
,OrCondition
,XorCondition
public interface Condition extends Syntaxable
TheCondition
interface represents a node in the command line arguments syntax tree; simply extending theSyntaxable
interface and adding the functionality of providing access to the addedOperand
s (leafs). In future extensions, aCondition
might provide access to the childSyntaxable
elements contained in aCondition
instance. As of the current findings, access to the children of theCondition
node is not required and would make the interface unnecessarily complicated.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<? extends Operand<?>>
toOperands()
-
Methods inherited from interface org.refcodes.console.Syntaxable
get, parseArgs, parseArgs, toState, toSyntax, toSyntax
-
Methods inherited from interface org.refcodes.console.SyntaxUsage
toUsage, toUsage, toUsage
-
-
-
-
Method Detail
-
toOperands
java.util.List<? extends Operand<?>> toOperands()
Traverses the hierarchy ofCondition
s and collects all therein foundOperand
s and sub-types such as theFlag
or theOption
. This is most useful when creating a list ofOption
s,Flag
es andOperand
s when printing out detailed help.- Returns:
- The according
Operand
elements.
-
-