001    /*
002    // $Id: //open/mondrian/src/main/mondrian/calc/LevelCalc.java#5 $
003    // This software is subject to the terms of the Common Public License
004    // Agreement, available at the following URL:
005    // http://www.opensource.org/licenses/cpl.html.
006    // Copyright (C) 2006-2007 Julian Hyde
007    // All Rights Reserved.
008    // You must accept the terms of that agreement to use this software.
009    */
010    package mondrian.calc;
011    
012    import mondrian.olap.Evaluator;
013    import mondrian.olap.Level;
014    
015    /**
016     * Expression which yields a {@link mondrian.olap.Level}.
017     *
018     * <p>When implementing this interface, it is convenient to extend
019     * {@link mondrian.calc.impl.AbstractLevelCalc}, but it is not required.
020     *
021     * @author jhyde
022     * @version $Id: //open/mondrian/src/main/mondrian/calc/LevelCalc.java#5 $
023     * @since Sep 26, 2005
024     */
025    public interface LevelCalc extends Calc {
026        /**
027         * Evaluates this expression to yield a level.
028         *
029         * <p>Never returns null.
030         *
031         * @param evaluator Evaluation context
032         * @return a level
033         */
034        Level evaluateLevel(Evaluator evaluator);
035    }
036    
037    // End LevelCalc.java