001    /*
002    // $Id: //open/mondrian/src/main/mondrian/rolap/agg/SegmentDataset.java#6 $
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) 2002-2002 Kana Software, Inc.
007    // Copyright (C) 2002-2007 Julian Hyde and others
008    // All Rights Reserved.
009    // You must accept the terms of that agreement to use this software.
010    //
011    // jhyde, 21 March, 2002
012    */
013    package mondrian.rolap.agg;
014    
015    import mondrian.rolap.CellKey;
016    
017    import java.util.Map;
018    
019    /**
020     * A <code>SegmentDataset</code> holds the values in a segment.
021     *
022     * @author jhyde
023     * @since 21 March, 2002
024     * @version $Id: //open/mondrian/src/main/mondrian/rolap/agg/SegmentDataset.java#6 $
025     */
026    interface SegmentDataset extends Iterable<Map.Entry<CellKey,Object>> {
027        /**
028         * Returns the value at a given coordinate.
029         *
030         * @param pos Coordinate position
031         * @return Value
032         */
033        Object get(CellKey pos);
034    
035        /**
036         * Returns the number of bytes occupied by this dataset.
037         *
038         * @return number of bytes
039         */
040        double getBytes();
041    
042        void put(CellKey key, Object value);
043    }
044    
045    // End SegmentDataset.java