| Package | flare.query |
| Class | public class If |
| Inheritance | If Expression |
| Property | Defined by | ||
|---|---|---|---|
| els : Expression
Sub-expression evaluated if the test condition is false.
| If | ||
| numChildren : int [read-only]
The number of sub-expressions that are children of this expression.
| If | ||
| test : Expression
The conditional clause of the if statement.
| If | ||
| then : Expression
Sub-expression evaluated if the test condition is true.
| If | ||
| Method | Defined by | ||
|---|---|---|---|
|
If(test:*, thenExpr:*, elseExpr:*)
Create a new IfExpression.
| If | ||
|
Creates a cloned copy of the expression.
| If | ||
|
eval(o:Object = null):*
Evaluates this expression with the given input object.
| If | ||
![]() |
expr(o:*):Expression
[static]
Utility method that maps an input value into an Expression.
| Expression | |
|
getChildAt(idx:int):Expression
Returns the sub-expression at the given index.
| If | ||
![]() |
predicate(o:Object):Boolean
Boolean predicate that tests the output of evaluating this
expression.
| Expression | |
|
setChildAt(idx:int, expr:Expression):Boolean
Set the sub-expression at the given index.
| If | ||
|
toString():String
Returns a string representation of the expression.
| If | ||
![]() |
visit(f:Function):Boolean
Sequentially invokes the input function on this expression and all
sub-expressions.
| Expression | |
| els | property |
els:Expression [read-write]Sub-expression evaluated if the test condition is false.
Implementation public function get els():Expression
public function set els(value:Expression):void
| numChildren | property |
numChildren:int [read-only]The number of sub-expressions that are children of this expression.
Implementation public function get numChildren():int
| test | property |
test:Expression [read-write]The conditional clause of the if statement.
Implementation public function get test():Expression
public function set test(value:Expression):void
| then | property |
then:Expression [read-write]Sub-expression evaluated if the test condition is true.
Implementation public function get then():Expression
public function set then(value:Expression):void
| If | () | constructor |
public function If(test:*, thenExpr:*, elseExpr:*)Create a new IfExpression.
Parameterstest:* — the test expression for the if statement
|
|
thenExpr:* — the expression to evaluate if the test predicate
evaluates to true
|
|
elseExpr:* — the expression to evaluate if the test predicate
evaluates to false
|
| clone | () | method |
public override function clone():ExpressionCreates a cloned copy of the expression. Recursively clones any sub-expressions.
ReturnsExpression —
the cloned expression.
|
| eval | () | method |
public override function eval(o:Object = null):*Evaluates this expression with the given input object.
Parameterso:Object (default = null) — the input object to this expression
|
* — the result of evaluating the expression
|
| getChildAt | () | method |
public override function getChildAt(idx:int):ExpressionReturns the sub-expression at the given index.
Parametersidx:int — the index of the child sub-expression
|
Expression —
the requested sub-expression.
|
| setChildAt | () | method |
public override function setChildAt(idx:int, expr:Expression):BooleanSet the sub-expression at the given index.
Parametersidx:int — the index of the child sub-expression
|
|
expr:Expression — the sub-expression to set
|
Boolean — true if the the sub-expression was successfully set,
false otherwise
|
| toString | () | method |
public override function toString():StringReturns a string representation of the expression.
ReturnsString — this expression as a string value
|