Package mondrian.rolap.agg
Class DenseSegmentDataset
- java.lang.Object
-
- 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
ADenseSegmentDatasetis 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
Fields Modifier and Type Field Description protected int[]axisMultipliers
-
Constructor Summary
Constructors Constructor Description DenseSegmentDataset(SegmentAxis[] axes)Creates a DenseSegmentDataset.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description doublegetBytes()Returns the number of bytes occupied by this dataset.doublegetDouble(CellKey pos)Returns the value at a given coordinate, as adouble.intgetInt(CellKey pos)Returns the value at a given coordinate, as anint.protected abstract ObjectgetObject(int i)ObjectgetObject(CellKey pos)Returns the value at a given coordinate, as anObject.protected intgetOffset(int[] keys)protected intgetOffset(Object[] keys)protected abstract intgetSize()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 java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface mondrian.rolap.agg.SegmentDataset
createSegmentBody, exists, getType, isNull, populateFrom, populateFrom
-
-
-
-
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:SegmentDatasetReturns the number of bytes occupied by this dataset.- Specified by:
getBytesin interfaceSegmentDataset- Returns:
- number of bytes
-
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:SegmentDatasetReturns the value at a given coordinate, as anObject.- Specified by:
getObjectin interfaceSegmentDataset- Parameters:
pos- Coordinate position- Returns:
- Value
-
getInt
public int getInt(CellKey pos)
Description copied from interface:SegmentDatasetReturns the value at a given coordinate, as anint.- Specified by:
getIntin interfaceSegmentDataset- Parameters:
pos- Coordinate position- Returns:
- Value
-
getDouble
public double getDouble(CellKey pos)
Description copied from interface:SegmentDatasetReturns the value at a given coordinate, as adouble.- Specified by:
getDoublein interfaceSegmentDataset- Parameters:
pos- Coordinate position- Returns:
- Value
-
getSize
protected abstract int getSize()
-
-