Packageflare.query
Classpublic class Fn
InheritanceFn Inheritance CompositeExpression Inheritance Expression

Expression operator that performs function invocation. The set of available functions is determined by a static function table maintained by this class. The function table can be extended to introduce custom functions into the query language.



Public Properties
 PropertyDefined by
 InheritednumChildren : int
The number of sub-expressions that are children of this expression.
CompositeExpression
  table : Object
[static] Function table mapping function names to Function instances.
Fn
Protected Properties
 PropertyDefined by
 Inherited_children : Array
Array of sub-expressions.
CompositeExpression
Public Methods
 MethodDefined by
  
Fn(name:String, ... args)
Creates a new Fn (function) operator.
Fn
 Inherited
addChild(expr:Expression):void
Adds an additional sub-expression to this composite.
CompositeExpression
  
Creates a cloned copy of the expression.
Fn
  
eval(o:Object = null):*
Evaluates this expression with the given input object.
Fn
 Inherited
[static] Utility method that maps an input value into an Expression.
Expression
 Inherited
Returns the sub-expression at the given index.
CompositeExpression
 Inherited
predicate(o:Object):Boolean
Boolean predicate that tests the output of evaluating this expression.
Expression
 Inherited
Removes all sub-expressions from this composite.
CompositeExpression
 Inherited
removeChild(expr:Expression):Boolean
Removes a sub-expression from this composite.
CompositeExpression
 Inherited
setChildAt(idx:int, expr:Expression):Boolean
Set the sub-expression at the given index.
CompositeExpression
 Inherited
setChildren(array:Array):void
Sets the sub-expressions of this composite
CompositeExpression
  
toString():String
Returns a string representation of the expression.
Fn
 Inherited
visit(f:Function):Boolean
Sequentially invokes the input function on this expression and all sub-expressions.
Expression
Protected Methods
 MethodDefined by
 Inherited
Helper routine that clones this composite's sub-expressions.
CompositeExpression
 Inherited
getString(op:String = null):String
Returns a string representation of this composite's sub-expressions.
CompositeExpression
Property detail
tableproperty
public static var table:Object

Function table mapping function names to Function instances. Functions can be added or removed at run-time by editing this object.

Constructor detail
Fn()constructor
public function Fn(name:String, ... args)

Creates a new Fn (function) operator.

Parameters
name:String — the name of the function. This should map to an entry in the static function table.
 
... args
Method detail
clone()method
public override function clone():Expression

Creates a cloned copy of the expression. Recursively clones any sub-expressions.

Returns
Expression — the cloned expression.
eval()method 
public override function eval(o:Object = null):*

Evaluates this expression with the given input object.

Parameters
o:Object (default = null) — the input object to this expression

Returns
* — the result of evaluating the expression
toString()method 
public override function toString():String

Returns a string representation of the expression.

Returns
String — this expression as a string value