KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mondrian > olap > Aggregator


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/olap/Aggregator.java#5 $
3 // This software is subject to the terms of the Common Public License
4 // Agreement, available at the following URL:
5 // http://www.opensource.org/licenses/cpl.html.
6 // Copyright (C) 2003-2006 Julian Hyde
7 // All Rights Reserved.
8 // You must accept the terms of that agreement to use this software.
9 */

10 package mondrian.olap;
11
12 import mondrian.calc.Calc;
13
14 import java.util.List JavaDoc;
15
16 /**
17  * Describes an aggregation operator, such as "sum" or "count".
18  *
19  * @see FunDef
20  * @see Evaluator
21  *
22  * @author jhyde$
23  * @since Jul 9, 2003$
24  * @version $Id: //open/mondrian/src/main/mondrian/olap/Aggregator.java#5 $
25  */

26 public interface Aggregator {
27     /**
28      * Returns the aggregator used to combine sub-totals into a grand-total.
29      */

30     Aggregator getRollup();
31
32     /**
33      * Applies this aggregator to an expression over a set of members and
34      * returns the result.
35      *
36      * @param evaluator Evaluation context
37      * @param members List of members, not null
38      * @param calc Expression to evaluate
39      */

40     Object JavaDoc aggregate(Evaluator evaluator, List JavaDoc members, Calc calc);
41 }
42
43 // End Aggregator.java
44
Popular Tags