Packageflare.query
Classpublic class BinaryExpression
InheritanceBinaryExpression Inheritance Expression
SubclassesArithmetic, Comparison, Match

Base class for binary expression operators.



Public Properties
 PropertyDefined by
  left : Expression
The left-hand-side sub-expression.
BinaryExpression
  numChildren : int
[read-only] The number of sub-expressions that are children of this expression.
BinaryExpression
  operator : int
Code indicating the operation performed by this instance.
BinaryExpression
  operatorString : String
[read-only] String representation of the operation performed by this instance.
BinaryExpression
  right : Expression
The right-hand-side sub-expression.
BinaryExpression
Protected Properties
 PropertyDefined by
  _left : Expression
The left-hand-side sub-expression.
BinaryExpression
  _op : int
Code indicating the operation perfomed by this instance.
BinaryExpression
  _right : Expression
The right-hand-side sub-expression.
BinaryExpression
Public Methods
 MethodDefined by
  
BinaryExpression(op:int, minOp:int, maxOp:int, left:*, right:*)
Creates a new BinaryExpression.
BinaryExpression
 Inherited
Creates a cloned copy of the expression.
Expression
 Inherited
eval(o:Object = null):*
Evaluates this expression with the given input object.
Expression
 Inherited
[static] Utility method that maps an input value into an Expression.
Expression
  
Returns the sub-expression at the given index.
BinaryExpression
 Inherited
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.
BinaryExpression
  
toString():String
Returns a string representation of the expression.
BinaryExpression
 Inherited
visit(f:Function):Boolean
Sequentially invokes the input function on this expression and all sub-expressions.
Expression
Property detail
_leftproperty
protected var _left:Expression

The left-hand-side sub-expression.

leftproperty 
left:Expression  [read-write]

The left-hand-side sub-expression.

Implementation
    public function get left():Expression
    public function set left(value:Expression):void
numChildrenproperty 
numChildren:int  [read-only]

The number of sub-expressions that are children of this expression.

Implementation
    public function get numChildren():int
_opproperty 
protected var _op:int

Code indicating the operation perfomed by this instance.

operatorproperty 
operator:int  [read-write]

Code indicating the operation performed by this instance.

Implementation
    public function get operator():int
    public function set operator(value:int):void
operatorStringproperty 
operatorString:String  [read-only]

String representation of the operation performed by this instance.

Implementation
    public function get operatorString():String
_rightproperty 
protected var _right:Expression

The right-hand-side sub-expression.

rightproperty 
right:Expression  [read-write]

The right-hand-side sub-expression.

Implementation
    public function get right():Expression
    public function set right(value:Expression):void
Constructor detail
BinaryExpression()constructor
public function BinaryExpression(op:int, minOp:int, maxOp:int, left:*, right:*)

Creates a new BinaryExpression.

Parameters
op:int — the operation code
 
minOp:int — the minimum legal operation code
 
maxOp:int — the maximum legal operation code
 
left:* — the left-hand-side sub-expression
 
right:* — the right-hand-side sub-expression
Method detail
getChildAt()method
public override function getChildAt(idx:int):Expression

Returns the sub-expression at the given index.

Parameters
idx:int — the index of the child sub-expression

Returns
Expression — the requested sub-expression.
setChildAt()method 
public override function setChildAt(idx:int, expr:Expression):Boolean

Set the sub-expression at the given index.

Parameters
idx:int — the index of the child sub-expression
 
expr:Expression — the sub-expression to set

Returns
Boolean — true if the the sub-expression was successfully set, false otherwise
toString()method 
public override function toString():String

Returns a string representation of the expression.

Returns
String — this expression as a string value