001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2006-2007 Pentaho 008// All Rights Reserved. 009*/ 010package mondrian.calc; 011 012import mondrian.olap.Evaluator; 013import mondrian.olap.Member; 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 * @since Sep 27, 2005 026 */ 027public interface TupleCalc extends Calc { 028 /** 029 * Evaluates this expression to yield a tuple. 030 * 031 * <p>A tuple cannot contain any null members. If any of the members is 032 * null, this method must return a null. 033 * 034 * @post result == null || !tupleContainsNullMember(result) 035 * 036 * @param evaluator Evaluation context 037 * @return an array of members, or null to represent the null tuple 038 */ 039 Member[] evaluateTuple(Evaluator evaluator); 040} 041 042// End TupleCalc.java