mondrian.rolap.agg
Class DenseSegmentDataset

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

abstract 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

Field Summary
protected  int[] axisMultipliers
           
 
Constructor Summary
DenseSegmentDataset(SegmentAxis[] axes)
          Creates a DenseSegmentDataset.
 
Method Summary
 double getBytes()
          Returns the number of bytes occupied by this dataset.
 double getDouble(CellKey pos)
          Returns the value at a given coordinate, as a double.
 int getInt(CellKey pos)
          Returns the value at a given coordinate, as an int.
 Object getObject(CellKey pos)
          Returns the value at a given coordinate, as an Object.
protected abstract  Object getObject(int i)
           
protected  int getOffset(int[] keys)
           
protected  int getOffset(Object[] keys)
           
protected abstract  int getSize()
           
 Iterator<Map.Entry<CellKey,Object>> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface mondrian.rolap.agg.SegmentDataset
createSegmentBody, exists, getType, isNull, populateFrom, populateFrom
 

Field Detail

axisMultipliers

protected final int[] axisMultipliers
Constructor Detail

DenseSegmentDataset

DenseSegmentDataset(SegmentAxis[] axes)
Creates a DenseSegmentDataset.

Parameters:
axes - Segment axes, containing actual column values
Method Detail

getBytes

public final 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

iterator

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

getObject

protected abstract Object getObject(int i)

getOffset

protected final int getOffset(int[] keys)

getOffset

protected final int getOffset(Object[] keys)

getObject

public Object getObject(CellKey pos)
Description copied from interface: SegmentDataset
Returns the value at a given coordinate, as an Object.

Specified by:
getObject in interface SegmentDataset
Parameters:
pos - Coordinate position
Returns:
Value

getInt

public int getInt(CellKey pos)
Description copied from interface: SegmentDataset
Returns the value at a given coordinate, as an int.

Specified by:
getInt in interface SegmentDataset
Parameters:
pos - Coordinate position
Returns:
Value

getDouble

public double getDouble(CellKey pos)
Description copied from interface: SegmentDataset
Returns the value at a given coordinate, as a double.

Specified by:
getDouble in interface SegmentDataset
Parameters:
pos - Coordinate position
Returns:
Value

getSize

protected abstract int getSize()

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads