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
ADenseSegmentDataset
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
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 double
getBytes()
Returns the number of bytes occupied by this dataset.double
getDouble(CellKey pos)
Returns the value at a given coordinate, as adouble
.int
getInt(CellKey pos)
Returns the value at a given coordinate, as anint
.protected abstract Object
getObject(int i)
Object
getObject(CellKey pos)
Returns the value at a given coordinate, as anObject
.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 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:SegmentDataset
Returns the number of bytes occupied by this dataset.- Specified by:
getBytes
in 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:SegmentDataset
Returns the value at a given coordinate, as anObject
.- Specified by:
getObject
in interfaceSegmentDataset
- 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 anint
.- Specified by:
getInt
in interfaceSegmentDataset
- 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 adouble
.- Specified by:
getDouble
in interfaceSegmentDataset
- Parameters:
pos
- Coordinate position- Returns:
- Value
-
getSize
protected abstract int getSize()
-
-