1 10 package mondrian.calc.impl; 11 12 import mondrian.olap.Evaluator; 13 import mondrian.olap.Exp; 14 import mondrian.olap.type.NumericType; 15 import mondrian.calc.impl.AbstractCalc; 16 import mondrian.calc.IntegerCalc; 17 import mondrian.calc.Calc; 18 19 30 public abstract class AbstractIntegerCalc 31 extends AbstractCalc 32 implements IntegerCalc { 33 private final Calc[] calcs; 34 35 protected AbstractIntegerCalc(Exp exp, Calc[] calcs) { 36 super(exp); 37 this.calcs = calcs; 38 assert getType() instanceof NumericType; 39 } 40 41 public Object evaluate(Evaluator evaluator) { 42 return evaluateInteger(evaluator); 43 } 44 45 public Calc[] getCalcs() { 46 return calcs; 47 } 48 } 49 50 | Popular Tags |