Package nl.rrd.wool.model.command
Class WoolIfCommand.Clause
- java.lang.Object
-
- nl.rrd.wool.model.command.WoolIfCommand.Clause
-
- Enclosing class:
- WoolIfCommand
public static class WoolIfCommand.Clause extends Object
This class models a clause of an if statement. That is the "if" clause or an "elseif" clause.
-
-
Constructor Summary
Constructors Constructor Description Clause(Expression expression, WoolNodeBody statement)Constructs a new if clause.Clause(WoolIfCommand.Clause other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExpressiongetExpression()Returns the if expression that should be evaluated as a boolean.WoolNodeBodygetStatement()Returns the statement that should be output if the expression evaluates to true.voidsetExpression(Expression expression)Sets the if expression that should be evaluated as a boolean.voidsetStatement(WoolNodeBody statement)Sets the statement that should be output if the expression evaluates to true.
-
-
-
Constructor Detail
-
Clause
public Clause(Expression expression, WoolNodeBody statement)
Constructs a new if clause.- Parameters:
expression- the if expression that should be evaluated as a booleanstatement- the statement that should be output if the expression evaluates to true
-
Clause
public Clause(WoolIfCommand.Clause other)
-
-
Method Detail
-
getExpression
public Expression getExpression()
Returns the if expression that should be evaluated as a boolean.- Returns:
- the if expression
-
setExpression
public void setExpression(Expression expression)
Sets the if expression that should be evaluated as a boolean.- Parameters:
expression- the if expression
-
getStatement
public WoolNodeBody getStatement()
Returns the statement that should be output if the expression evaluates to true.- Returns:
- the statement
-
setStatement
public void setStatement(WoolNodeBody statement)
Sets the statement that should be output if the expression evaluates to true.- Parameters:
statement- the statement
-
-