public final class IfThenElseTerm extends IfThenElseExpression implements Term
Modifier and Type | Field and Description |
---|---|
static int |
precedence |
elseKeyword, elsifKeyword, endifKeyword, ifKeyword, thenKeyword
Modifier and Type | Method and Description |
---|---|
void |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
static IfThenElseTerm |
construct(Formula cond,
Term tbranch,
Term ebranch)
Construct a conditional term.
|
Term |
getElseBranch()
Get "else" branch.
|
int |
getPrecedence()
Get precedence value of the term operator
(higher precedence value means higher binding power)
|
Term |
getThenBranch()
Get "then" branch.
|
Type |
getType()
Set type annotation of term.
|
void |
setType(Type type)
Set type annotation of term.
|
accept, acceptChildren, getCondition
getPosition, isLeftAssociative, isRightAssociative, setPosition
accept, accept, print, printCore, toString, toStringCore
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
isLeftAssociative, isRightAssociative
getPosition, setPosition
accept, acceptChildren, print, printCore, toString, toStringCore
public static final int precedence
public void setType(Type type)
public Type getType()
public static IfThenElseTerm construct(Formula cond, Term tbranch, Term ebranch)
cond
- the condition.tbranch
- the "then" branch.ebranch
- the "else" branch.public Term getThenBranch()
getThenBranch
in class IfThenElseExpression
public Term getElseBranch()
getElseBranch
in class IfThenElseExpression
public int getPrecedence()
getPrecedence
in interface Expression
getPrecedence
in class ExpressionBase
public void accept(ASTVisitor visitor)
accept
in interface AST
accept
in class IfThenElseExpression
visitor
- the visitor who is accepted by this node.