001    /*
002    // $Id: //open/mondrian/src/main/mondrian/calc/BooleanCalc.java#3 $
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-2006 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    
014    /**
015     * Compiled expression whose result is a <code>boolean</code>.
016     *
017     * <p>When implementing this interface, it is convenient to extend
018     * {@link mondrian.calc.impl.AbstractBooleanCalc}, but it is not required.
019     *
020     * @author jhyde
021     * @version $Id: //open/mondrian/src/main/mondrian/calc/BooleanCalc.java#3 $
022     * @since Sep 27, 2005
023     */
024    public interface BooleanCalc extends Calc {
025        /**
026         * Evaluates this expression to yield a <code>boolean</code> value.
027         * If the result is null, returns the special
028         * {@link mondrian.olap.fun.FunUtil#BooleanNull} value.
029         *
030         * @param evaluator Evaluation context
031         * @return evaluation result
032         */
033        boolean evaluateBoolean(Evaluator evaluator);
034    }
035    
036    // End BooleanCalc.java