Class CommandCase
java.lang.Object
com.scriptbasic.executors.commands.AbstractCommand
com.scriptbasic.executors.commands.AbstractCommandSelectPart
com.scriptbasic.executors.commands.CommandCase
- All Implemented Interfaces:
AnalysisResult,Executor,NestedStructure,Command
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceOne condition in the case statement Single case statement can contain multiple conditions.static classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCaseCondition(CommandCase.CaseCondition caseCondition) voidaddCaseEqualCondition(Expression expression) voidaddCaseFromToCondition(Expression fromExpression, Expression toExpression) voidexecute(Interpreter interpreter) booleanmatches(Interpreter interpreter, RightValue expressionValue) voidsetEndSelect(CommandEndSelect commandEndSelect) Methods inherited from class com.scriptbasic.executors.commands.AbstractCommand
checkedExecute, getNextCommand, setNextCommand
-
Constructor Details
-
CommandCase
public CommandCase()
-
-
Method Details
-
execute
- Specified by:
executein interfaceExecutor- Specified by:
executein classAbstractCommand- Parameters:
interpreter- parameter
-
addCaseCondition
-
matches
public boolean matches(Interpreter interpreter, RightValue expressionValue) throws ScriptBasicException - Throws:
ScriptBasicException
-
addCaseEqualCondition
-
addCaseFromToCondition
-
setEndSelect
-