KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mondrian > calc > impl > AbstractTupleCalc


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/calc/impl/AbstractTupleCalc.java#2 $
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) 2006-2006 Julian Hyde
7 // All Rights Reserved.
8 // You must accept the terms of that agreement to use this software.
9 */

10 package mondrian.calc.impl;
11
12 import mondrian.olap.Evaluator;
13 import mondrian.olap.Exp;
14 import mondrian.calc.impl.AbstractCalc;
15 import mondrian.calc.TupleCalc;
16 import mondrian.calc.Calc;
17
18 /**
19  * Abstract implementation of the {@link mondrian.calc.TupleCalc} interface.
20  *
21  * <p>The derived class must
22  * implement the {@link #evaluateTuple(mondrian.olap.Evaluator)} method,
23  * and the {@link #evaluate(mondrian.olap.Evaluator)} method will call it.
24  *
25  * @author jhyde
26  * @version $Id: //open/mondrian/src/main/mondrian/calc/impl/AbstractTupleCalc.java#2 $
27  * @since Sep 27, 2005
28  */

29 public abstract class AbstractTupleCalc
30         extends AbstractCalc
31         implements TupleCalc {
32     private final Calc[] calcs;
33
34     protected AbstractTupleCalc(Exp exp, Calc[] calcs) {
35         super(exp);
36         this.calcs = calcs;
37     }
38
39     public Object JavaDoc evaluate(Evaluator evaluator) {
40         return evaluateTuple(evaluator);
41     }
42
43     public Calc[] getCalcs() {
44         return calcs;
45     }
46 }
47
48 // End AbstractTupleCalc.java
49
Popular Tags