KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/calc/impl/ValueCalc.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.*;
13 import mondrian.calc.Calc;
14
15 /**
16  * Expression which yields the value of the current member in the current
17  * dimensional context.
18  *
19  * @see mondrian.calc.impl.MemberValueCalc
20  *
21  * @author jhyde
22  * @version $Id: //open/mondrian/src/main/mondrian/calc/impl/ValueCalc.java#2 $
23  * @since Sep 27, 2005
24  */

25 public class ValueCalc extends GenericCalc {
26     public ValueCalc(Exp exp) {
27         super(exp);
28     }
29
30     public Object JavaDoc evaluate(Evaluator evaluator) {
31         return evaluator.evaluateCurrent();
32     }
33
34     public Calc[] getCalcs() {
35         return new Calc[0];
36     }
37
38     public boolean dependsOn(Dimension dimension) {
39         return true;
40     }
41 }
42
43 // End ValueCalc.java
44
Popular Tags