| Package | flare.query |
| Class | public class ExpressionIterator |
| Property | Defined by | ||
|---|---|---|---|
| current : Expression
[read-only] The expression at this iterator's current position.
| ExpressionIterator | ||
| depth : int [read-only] The depth of this iterator's current position in the
expression tree.
| ExpressionIterator | ||
| expression : Expression
The expression being traversed.
| ExpressionIterator | ||
| parent : Expression
[read-only] The parent expression of the iterator's current position.
| ExpressionIterator | ||
| path : Array [read-only] An array of expressions from the root expression down to this
iterator's current position.
| ExpressionIterator | ||
| Method | Defined by | ||
|---|---|---|---|
|
ExpressionIterator(expr:Expression = null)
Creates a new ExpressionIterator.
| ExpressionIterator | ||
|
down(idx:int = 0):Expression
Moves the iterator one level down the expression tree.
| ExpressionIterator | ||
|
Moves the iterator to the next sibling expression in the expression
tree.
| ExpressionIterator | ||
|
Moves the iterator to the previous sibling expression in the
expression tree.
| ExpressionIterator | ||
|
reset():void
Resets this iterator to the root of the expression tree.
| ExpressionIterator | ||
|
up():Expression
Moves the iterator one level up the expression tree.
| ExpressionIterator | ||
| current | property |
current:Expression [read-only]The expression at this iterator's current position.
Implementation public function get current():Expression
| depth | property |
depth:int [read-only]The depth of this iterator's current position in the expression tree.
Implementation public function get depth():int
| expression | property |
expression:Expression [read-write]The expression being traversed.
Implementation public function get expression():Expression
public function set expression(value:Expression):void
| parent | property |
parent:Expression [read-only]The parent expression of the iterator's current position.
Implementation public function get parent():Expression
| path | property |
path:Array [read-only]An array of expressions from the root expression down to this iterator's current position.
Implementation public function get path():Array
| ExpressionIterator | () | constructor |
public function ExpressionIterator(expr:Expression = null)Creates a new ExpressionIterator.
Parametersexpr:Expression (default = null) — the expression to iterate over
|
| down | () | method |
public function down(idx:int = 0):ExpressionMoves the iterator one level down the expression tree. By default, the iterator moves to the left-most child of the previous position.
Parametersidx:int (default = 0) — the index of the child expression this iterator should
move down to
|
Expression —
the new current expression, or null if the iterator
could not move any further down the tree
|
| next | () | method |
public function next():ExpressionMoves the iterator to the next sibling expression in the expression tree.
ReturnsExpression —
the new current expression, or null if the current position
has no next sibling.
|
| prev | () | method |
public function prev():ExpressionMoves the iterator to the previous sibling expression in the expression tree.
ReturnsExpression —
the new current expression, or null if the current position
has no previous sibling.
|
| reset | () | method |
public function reset():voidResets this iterator to the root of the expression tree.
| up | () | method |
public function up():ExpressionMoves the iterator one level up the expression tree.
ReturnsExpression —
the new current expression, or null if the iterator
could not move any further up the tree
|