mondrian.rolap.agg
Class DenseSegmentDataset

java.lang.Object
  extended by mondrian.rolap.agg.DenseSegmentDataset
All Implemented Interfaces:
Iterable<Map.Entry<CellKey,Object>>, SegmentDataset

 class DenseSegmentDataset
extends Object
implements SegmentDataset

A DenseSegmentDataset is a means of storing segment values which is suitable when most of the combinations of keys have a value present.

The storage requirements are as follows. Table requires 1 word per cell.

Since:
21 March, 2002
Author:
jhyde
 

Constructor Summary
DenseSegmentDataset(Segment segment, Object[] values)
           
 
Method Summary
(package private)  boolean contains(Object[] keys)
           
 Object get(CellKey key)
          Returns the value at a given coordinate.
(package private)  Object get(Object[] keys)
           
 double getBytes()
          Returns the number of bytes occupied by this dataset.
 Iterator<Map.Entry<CellKey,Object>> iterator()
           
 void put(CellKey key, Object value)
           
(package private)  void put(Object[] keys, Object value)
           
(package private)  void set(int k, Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DenseSegmentDataset

DenseSegmentDataset(Segment segment,
                    Object[] values)
Method Detail

get

public Object get(CellKey key)
Description copied from interface: SegmentDataset
Returns the value at a given coordinate.

Specified by:
get in interface SegmentDataset
Parameters:
key - Coordinate position
Returns:
Value

getBytes

public double getBytes()
Description copied from interface: SegmentDataset
Returns the number of bytes occupied by this dataset.

Specified by:
getBytes in interface SegmentDataset
Returns:
number of bytes

put

public void put(CellKey key,
                Object value)
Specified by:
put in interface SegmentDataset

iterator

public Iterator<Map.Entry<CellKey,Object>> iterator()
Specified by:
iterator in interface Iterable<Map.Entry<CellKey,Object>>

contains

boolean contains(Object[] keys)

get

Object get(Object[] keys)

put

void put(Object[] keys,
         Object value)

set

void set(int k,
         Object o)

SourceForge.net_Logo