Packageflare.query
Classpublic class Average
InheritanceAverage Inheritance AggregateExpression Inheritance Expression

Aggregate operator for computing the average of a set of values.



Public Properties
 PropertyDefined by
 Inheritedinput : Expression
The sub-expression to aggregate.
AggregateExpression
 InheritednumChildren : int
The number of sub-expressions that are children of this expression.
AggregateExpression
Protected Properties
 PropertyDefined by
  _count : Number
Average
 Inherited_expr : Expression
The sub-expression to aggregate.
AggregateExpression
  _sum : Number
Average
Public Methods
 MethodDefined by
  
Average(input:*)
Creates a new Average operator
Average
  
aggregate(value:Object):void
Increments the aggregation computation to include the input value.
Average
 Inherited
Creates a cloned copy of the expression.
Expression
  
eval(o:Object = null):*
Evaluates this expression with the given input object.
Average
 Inherited
[static] Utility method that maps an input value into an Expression.
Expression
 Inherited
Returns the sub-expression at the given index.
AggregateExpression
 Inherited
predicate(o:Object):Boolean
Boolean predicate that tests the output of evaluating this expression.
Expression
  
reset():void
Resets the aggregation computation.
Average
 Inherited
setChildAt(idx:int, expr:Expression):Boolean
Set the sub-expression at the given index.
AggregateExpression
 Inherited
toString():String
Returns a string representation of the expression.
Expression
 Inherited
visit(f:Function):Boolean
Sequentially invokes the input function on this expression and all sub-expressions.
Expression
Property detail
_countproperty
protected var _count:Number
_sumproperty 
protected var _sum:Number
Constructor detail
Average()constructor
public function Average(input:*)

Creates a new Average operator

Parameters
input:* — the sub-expression of which to compute the average
Method detail
aggregate()method
public override function aggregate(value:Object):void

Increments the aggregation computation to include the input value.

Parameters
value:Object — a value to include within the aggregation.
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
reset()method 
public override function reset():void

Resets the aggregation computation.