public class OwExprConditionalExpression extends OwExprExpression
The short conditional expression parsing result :
1+b>a?'ok':'nok'
1+b>a is the test expression
'ok' is the true expression
'nok' is the false expression
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
m_errorTable, m_symbolTable, m_typeError| Constructor and Description |
|---|
OwExprConditionalExpression(OwExprSymbolTable symbolTable_p,
OwExprErrorTable errorTable_p,
OwExprExpression test_p,
OwExprExpression trueExpression_p,
OwExprExpression falseExpression_p)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
OwExprValue |
evaluate(OwExprScope scope_p)
Evaluates this expression :
If the m_test expression results in a OwExprBooleanValue equal to OwExprBooleanValue.TRUE than the
m_trueExpression is evaluated end the result returned otherwise the m_falseExpression expression is evaluated
and the result returned. |
String |
toString() |
OwExprExpressionType |
type()
Type check method.
|
errCount, evaluate, evaluate, getErrorTable, getSymbol, getSymbolTable, hasErrors, initType, symbolsVisibleInScopespublic OwExprConditionalExpression(OwExprSymbolTable symbolTable_p, OwExprErrorTable errorTable_p, OwExprExpression test_p, OwExprExpression trueExpression_p, OwExprExpression falseExpression_p)
symbolTable_p - the global symbol tableerrorTable_p - the global error tabletest_p - the test expressiontrueExpression_p - the true branch expressionfalseExpression_p - the false branch expressionpublic OwExprValue evaluate(OwExprScope scope_p) throws OwExprEvaluationException
m_test expression results in a OwExprBooleanValue equal to OwExprBooleanValue.TRUE than the
m_trueExpression is evaluated end the result returned otherwise the m_falseExpression expression is evaluated
and the result returned.evaluate in class OwExprExpressionscope_p - OwExprEvaluationExceptionpublic OwExprExpressionType type() throws OwExprTypeMissmatchException
OwExprExpression.m_typeError should
be set to true .
The type check is also forced on all dependent expressions m_test,m_trueExpression and m_falseExpression.type in class OwExprExpressionOwExprTypeMissmatchException - if type errors are encountered during type computationCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.