KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/calc/impl/AbstractVoidCalc.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.*;
15
16 /**
17  * Abstract implementation of the {@link mondrian.calc.VoidCalc} interface.
18  *
19  * <p>The derived class must
20  * implement the {@link #evaluateVoid(mondrian.olap.Evaluator)} method,
21  * and the {@link #evaluate(mondrian.olap.Evaluator)} method will call it
22  * and return <code>null</code>.
23  *
24  * @author jhyde
25  * @version $Id: //open/mondrian/src/main/mondrian/calc/impl/AbstractVoidCalc.java#2 $
26  * @since Sep 29, 2005
27  */

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