| Package | flare.query |
| Class | public class Comparison |
| Inheritance | Comparison BinaryExpression Expression |
| Property | Defined by | ||
|---|---|---|---|
| comparator : Function Comparison function for custom ordering criteria.
| Comparison | ||
![]() | 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.
| Comparison | ||
![]() | right : Expression
The right-hand-side sub-expression.
| BinaryExpression | |
| Method | Defined by | ||
|---|---|---|---|
|
Comparison(op:int = 2, left:Function, right:*, comparator:* = null)
Creates a new Comparison operator.
| Comparison | ||
|
Creates a cloned copy of the expression.
| Comparison | ||
|
Equal(left:*, right:*):Comparison
[static]
Creates a new Comparison operator for an equals comparison.
| Comparison | ||
|
eval(o:Object = null):*
Evaluates this expression with the given input object.
| Comparison | ||
![]() |
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 | |
|
GreaterThan(left:*, right:*):Comparison
[static]
Creates a new Comparison operator for a greater-than comparison.
| Comparison | ||
|
GreaterThanOrEqual(left:*, right:*):Comparison
[static]
Creates a new Comparison operator for a greater-than-or-equal
comparison.
| Comparison | ||
|
LessThan(left:*, right:*):Comparison
[static]
Creates a new Comparison operator for a less-than comparison.
| Comparison | ||
|
LessThanOrEqual(left:*, right:*):Comparison
[static]
Creates a new Comparison operator for a less-than-or-equal
comparison.
| Comparison | ||
|
NotEqual(left:*, right:*):Comparison
[static]
Creates a new Comparison operator for a not equals comparison.
| Comparison | ||
|
predicate(o:Object):Boolean
Boolean predicate that tests the output of evaluating this
expression.
| Comparison | ||
![]() |
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 | |
![]() |
visit(f:Function):Boolean
Sequentially invokes the input function on this expression and all
sub-expressions.
| Expression | |
| Constant | Defined by | ||
|---|---|---|---|
| EQ : int = 2 [static] Indicates a equals comparison.
| Comparison | ||
| GT : int = 1 [static] Indicates a greater-than comparison.
| Comparison | ||
| GTEQ : int = 5 [static] Indicates a greater-than-or-equals comparison.
| Comparison | ||
| LT : int = 0 [static] Indicates a less-than comparison.
| Comparison | ||
| LTEQ : int = 4 [static] Indicates a less-than-or-equals comparison.
| Comparison | ||
| NEQ : int = 3 [static] Indicates a not-equals comparison.
| Comparison | ||
| comparator | property |
comparator:Function [read-write]Comparison function for custom ordering criteria.
Implementation public function get comparator():Function
public function set comparator(value:Function):void
| operatorString | property |
operatorString:String [read-only]Returns a string representation of the arithmetic operator.
Implementation public function get operatorString():String
| Comparison | () | constructor |
public function Comparison(op:int = 2, left:Function, right:*, comparator:* = null)Creates a new Comparison operator.
Parametersop:int (default = 2) — the left-hand-side sub-expression to compare
|
|
left:Function — the right-hand-side sub-expression to compare
|
|
right:* — a function to use for comparison (null by default)
|
|
comparator:* (default = null) |
| clone | () | method |
public override function clone():ExpressionCreates a cloned copy of the expression. Recursively clones any sub-expressions.
ReturnsExpression —
the cloned expression.
|
| Equal | () | method |
public static function Equal(left:*, right:*):ComparisonCreates a new Comparison operator for an equals comparison.
Parametersleft:* — the left-hand input expression
|
|
right:* — the right-hand input expression
|
Comparison —
the new Comparison 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
|
| GreaterThan | () | method |
public static function GreaterThan(left:*, right:*):ComparisonCreates a new Comparison operator for a greater-than comparison.
Parametersleft:* — the left-hand input expression
|
|
right:* — the right-hand input expression
|
Comparison —
the new Comparison operator
|
| GreaterThanOrEqual | () | method |
public static function GreaterThanOrEqual(left:*, right:*):ComparisonCreates a new Comparison operator for a greater-than-or-equal comparison.
Parametersleft:* — the left-hand input expression
|
|
right:* — the right-hand input expression
|
Comparison —
the new Comparison operator
|
| LessThan | () | method |
public static function LessThan(left:*, right:*):ComparisonCreates a new Comparison operator for a less-than comparison.
Parametersleft:* — the left-hand input expression
|
|
right:* — the right-hand input expression
|
Comparison —
the new Comparison operator
|
| LessThanOrEqual | () | method |
public static function LessThanOrEqual(left:*, right:*):ComparisonCreates a new Comparison operator for a less-than-or-equal comparison.
Parametersleft:* — the left-hand input expression
|
|
right:* — the right-hand input expression
|
Comparison —
the new Comparison operator
|
| NotEqual | () | method |
public static function NotEqual(left:*, right:*):ComparisonCreates a new Comparison operator for a not equals comparison.
Parametersleft:* — the left-hand input expression
|
|
right:* — the right-hand input expression
|
Comparison —
the new Comparison operator
|
| predicate | () | method |
public override function predicate(o:Object):BooleanBoolean predicate that tests the output of evaluating this expression. Returns true if the expression evaluates to true, or a non-null or non-zero value. Returns false if the expression evaluates to false, or a null or zero value.
Parameterso:Object — the input object to this expression
|
Boolean — the Boolean result of evaluating the expression
|
| EQ | constant |
public static const EQ:int = 2Indicates a equals comparison.
| GT | constant |
public static const GT:int = 1Indicates a greater-than comparison.
| GTEQ | constant |
public static const GTEQ:int = 5Indicates a greater-than-or-equals comparison.
| LT | constant |
public static const LT:int = 0Indicates a less-than comparison.
| LTEQ | constant |
public static const LTEQ:int = 4Indicates a less-than-or-equals comparison.
| NEQ | constant |
public static const NEQ:int = 3Indicates a not-equals comparison.