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
public class CommandCase extends AbstractCommandSelectPart
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCommandCase.CaseConditionOne condition in the case statement Single case statement can contain multiple conditions.static classCommandCase.EqualCaseConditionstatic classCommandCase.FromToCaseCondition -
Constructor Summary
Constructors Constructor Description CommandCase() -
Method Summary
Modifier and Type Method Description voidaddCaseCondition(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
-