Package mondrian.rolap.agg
Class SparseSegmentBody
- java.lang.Object
-
- mondrian.rolap.agg.AbstractSegmentBody
-
- mondrian.rolap.agg.SparseSegmentBody
-
- All Implemented Interfaces:
java.io.Serializable
,SegmentBody
class SparseSegmentBody extends AbstractSegmentBody
Implementation of a segment body which stores the data of a sparse segment data set into a dense array of java objects.- Author:
- LBoudreau
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.Object[]
data
(package private) CellKey[]
keys
-
Fields inherited from class mondrian.rolap.agg.AbstractSegmentBody
axisValueSets
-
-
Constructor Summary
Constructors Constructor Description SparseSegmentBody(java.util.Map<CellKey,java.lang.Object> dataToSave, java.util.List<Pair<java.util.SortedSet<java.lang.Comparable>,java.lang.Boolean>> axes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
getObject(int i)
protected int
getSize()
Returns the overall amount of stored elements, including those, that are considered to be null.java.util.Map<CellKey,java.lang.Object>
getValueMap()
Converts contents of this segment into a cellkey/value map.-
Methods inherited from class mondrian.rolap.agg.AbstractSegmentBody
getAxisValueSets, getEffectiveSize, getNullAxisFlags, getNullValueIndicators, getValueArray
-
-
-
-
Field Detail
-
keys
final CellKey[] keys
-
data
final java.lang.Object[] data
-
-
Method Detail
-
getSize
protected int getSize()
Description copied from class:AbstractSegmentBody
Returns the overall amount of stored elements, including those, that are considered to be null.- Specified by:
getSize
in classAbstractSegmentBody
- Returns:
- the size of stored data
-
getObject
protected java.lang.Object getObject(int i)
- Specified by:
getObject
in classAbstractSegmentBody
-
getValueMap
public java.util.Map<CellKey,java.lang.Object> getValueMap()
Description copied from interface:SegmentBody
Converts contents of this segment into a cellkey/value map. Use only for sparse segments.- Specified by:
getValueMap
in interfaceSegmentBody
- Overrides:
getValueMap
in classAbstractSegmentBody
- Returns:
- Map containing cell values keyed by their coordinates
-
-