1 /* 2 // $Id: //open/mondrian/src/main/mondrian/calc/TupleCalc.java#5 $ 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-2007 Julian Hyde 7 // All Rights Reserved. 8 // You must accept the terms of that agreement to use this software. 9 */ 10 package mondrian.calc; 11 12 import mondrian.olap.Member; 13 import mondrian.olap.Evaluator; 14 15 /** 16 * Expression which yields a tuple. 17 * 18 * <p>The tuple is represented as an array of {@link Member} objects, 19 * <code>null</code> to represent the null tuple. 20 * 21 * <p>When implementing this interface, it is convenient to extend 22 * {@link mondrian.calc.impl.AbstractTupleCalc}, but it is not required. 23 * 24 * @author jhyde 25 * @version $Id: //open/mondrian/src/main/mondrian/calc/TupleCalc.java#5 $ 26 * @since Sep 27, 2005 27 */ 28 public interface TupleCalc extends Calc { 29 /** 30 * Evaluates this expression to yield a tuple. 31 * 32 * <p>A tuple cannot contain any null members. If any of the members is 33 * null, this method must return a null. 34 * 35 * @post result == null || !tupleContainsNullMember(result) 36 * 37 * @param evaluator Evaluation context 38 * @return an array of members, or null to represent the null tuple 39 */ 40 Member[] evaluateTuple(Evaluator evaluator); 41 } 42 43 // End TupleCalc.java 44