| Package | flare.query |
| Class | public class Arithmetic |
| Inheritance | Arithmetic BinaryExpression Expression |
| Property | Defined by | ||
|---|---|---|---|
![]() | left : Expression
The left-hand-side sub-expression.
| BinaryExpression | |
![]() | numChildren : int
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] Returns a string representation of the arithmetic operator.
| Arithmetic | ||
![]() | right : Expression
The right-hand-side sub-expression.
| BinaryExpression | |
| Method | Defined by | ||
|---|---|---|---|
|
Arithmetic(op:int, left:*, right:*)
Create a new Arithmetic expression.
| Arithmetic | ||
|
Add(left:*, right:*):Arithmetic
[static]
Creates a new Arithmetic operator for adding two numbers.
| Arithmetic | ||
|
Creates a cloned copy of the expression.
| Arithmetic | ||
|
Divide(left:*, right:*):Arithmetic
[static]
Creates a new Arithmetic operator for dividing one number
by another.
| Arithmetic | ||
|
eval(o:Object = null):*
Evaluates this expression with the given input object.
| Arithmetic | ||
![]() |
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.
| BinaryExpression | |
|
Mod(left:*, right:*):Arithmetic
[static]
Creates a new Arithmetic operator for computing the modulo
(remainder) of a number.
| Arithmetic | ||
|
Multiply(left:*, right:*):Arithmetic
[static]
Creates a new Arithmetic operator for multiplying two numbers.
| Arithmetic | ||
![]() |
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 | |
|
Subtract(left:*, right:*):Arithmetic
[static]
Creates a new Arithmetic operator for subtracting one number
from another.
| Arithmetic | ||
![]() |
toString():String
Returns a string representation of the expression.
| BinaryExpression | |
![]() |
visit(f:Function):Boolean
Sequentially invokes the input function on this expression and all
sub-expressions.
| Expression | |
| Constant | Defined by | ||
|---|---|---|---|
| ADD : int = 0 [static] Indicates an addition operation.
| Arithmetic | ||
| DIV : int = 3 [static] Indicates a division operation.
| Arithmetic | ||
| MOD : int = 4 [static] Indicates a modulo operation.
| Arithmetic | ||
| MUL : int = 2 [static] Indicates a multiplication operation.
| Arithmetic | ||
| SUB : int = 1 [static] Indicates a subtraction operation.
| Arithmetic | ||
| operatorString | property |
operatorString:String [read-only]Returns a string representation of the arithmetic operator.
Implementation public function get operatorString():String
| Arithmetic | () | constructor |
public function Arithmetic(op:int, left:*, right:*)Create a new Arithmetic expression.
Parametersop:int — the operation to perform
|
|
left:* — the left sub-expression
|
|
right:* — the right sub-expression
|
| Add | () | method |
public static function Add(left:*, right:*):ArithmeticCreates a new Arithmetic operator for adding two numbers.
Parametersleft:* — the left-hand input expression
|
|
right:* — the right-hand input expression
|
Arithmetic —
the new Arithmetic operator
|
| clone | () | method |
public override function clone():ExpressionCreates a cloned copy of the expression. Recursively clones any sub-expressions.
ReturnsExpression —
the cloned expression.
|
| Divide | () | method |
public static function Divide(left:*, right:*):ArithmeticCreates a new Arithmetic operator for dividing one number by another.
Parametersleft:* — the left-hand input expression
|
|
right:* — the right-hand input expression
|
Arithmetic —
the new Arithmetic operator
|
| 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
|
| Mod | () | method |
public static function Mod(left:*, right:*):ArithmeticCreates a new Arithmetic operator for computing the modulo (remainder) of a number.
Parametersleft:* — the left-hand input expression
|
|
right:* — the right-hand input expression
|
Arithmetic —
the new Arithmetic operator
|
| Multiply | () | method |
public static function Multiply(left:*, right:*):ArithmeticCreates a new Arithmetic operator for multiplying two numbers.
Parametersleft:* — the left-hand input expression
|
|
right:* — the right-hand input expression
|
Arithmetic —
the new Arithmetic operator
|
| Subtract | () | method |
public static function Subtract(left:*, right:*):ArithmeticCreates a new Arithmetic operator for subtracting one number from another.
Parametersleft:* — the left-hand input expression
|
|
right:* — the right-hand input expression
|
Arithmetic —
the new Arithmetic operator
|
| ADD | constant |
public static const ADD:int = 0Indicates an addition operation.
| DIV | constant |
public static const DIV:int = 3Indicates a division operation.
| MOD | constant |
public static const MOD:int = 4Indicates a modulo operation.
| MUL | constant |
public static const MUL:int = 2Indicates a multiplication operation.
| SUB | constant |
public static const SUB:int = 1Indicates a subtraction operation.