aggregateexpression.as
来自「用于flash/flex的 as3的 2D图形图像图表的动态生成」· AS 代码 · 共 72 行
AS
72 行
package flare.query
{
/**
* Base class representing an aggregate query operator.
*/
public class AggregateExpression extends Expression
{
/** The sub-expression to aggregate. */
protected var _expr:Expression;
/** The sub-expression to aggregate. */
public function get input():Expression { return _expr; }
public function set input(e:*):void {
_expr = Expression.expr(e);
}
/**
* @inheritDoc
*/
public override function get numChildren():int {
return 1;
}
/**
* Creates a new AggregateExpression.
* @param input the sub-expression to aggregate.
*/
public function AggregateExpression(input:*) {
this.input = input;
}
/**
* @inheritDoc
*/
public override function getChildAt(idx:int):Expression
{
return idx==0 ? _expr : null;
}
/**
* @inheritDoc
*/
public override function setChildAt(idx:int, expr:Expression):Boolean
{
if (idx == 0) {
_expr = expr;
return true;
}
return false;
}
// --------------------------------------------------------------------
/**
* Resets the aggregation computation.
*/
public function reset():void
{
// subclasses override this
}
/**
* Increments the aggregation computation to include the input value.
* @param value a value to include within the aggregation.
*/
public function aggregate(value:Object):void
{
// subclasses override this
}
} // end of class AggregateExpression
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?