001 /*
002 // $Id: //open/mondrian-release/3.0/src/main/mondrian/calc/TupleCalc.java#2 $
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.Member;
013 import mondrian.olap.Evaluator;
014
015 /**
016 * Expression which yields a tuple.
017 *
018 * <p>The tuple is represented as an array of {@link Member} objects,
019 * <code>null</code> to represent the null tuple.
020 *
021 * <p>When implementing this interface, it is convenient to extend
022 * {@link mondrian.calc.impl.AbstractTupleCalc}, but it is not required.
023 *
024 * @author jhyde
025 * @version $Id: //open/mondrian-release/3.0/src/main/mondrian/calc/TupleCalc.java#2 $
026 * @since Sep 27, 2005
027 */
028 public interface TupleCalc extends Calc {
029 /**
030 * Evaluates this expression to yield a tuple.
031 *
032 * <p>A tuple cannot contain any null members. If any of the members is
033 * null, this method must return a null.
034 *
035 * @post result == null || !tupleContainsNullMember(result)
036 *
037 * @param evaluator Evaluation context
038 * @return an array of members, or null to represent the null tuple
039 */
040 Member[] evaluateTuple(Evaluator evaluator);
041 }
042
043 // End TupleCalc.java