KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/calc/impl/AbstractStringCalc.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.StringCalc;
16 import mondrian.calc.Calc;
17
18 /**
19  * Abstract implementation of the {@link mondrian.calc.StringCalc} interface.
20  *
21  * <p>The derived class must
22  * implement the {@link #evaluateString(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/AbstractStringCalc.java#2 $
27  * @since Sep 26, 2005
28  */

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