mondrian.rolap.agg
Class SparseSegmentBody

java.lang.Object
  extended by mondrian.rolap.agg.AbstractSegmentBody
      extended by mondrian.rolap.agg.SparseSegmentBody
All Implemented Interfaces:
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
(package private)  Object[] data
           
(package private)  CellKey[] keys
           
 
Fields inherited from class mondrian.rolap.agg.AbstractSegmentBody
axisValueSets
 
Constructor Summary
SparseSegmentBody(Map<CellKey,Object> dataToSave, List<Pair<SortedSet<Comparable>,Boolean>> axes)
           
 
Method Summary
protected  Object getObject(int i)
           
protected  int getSize()
           
 Map<CellKey,Object> getValueMap()
          Converts contents of this segment into a cellkey/value map.
 
Methods inherited from class mondrian.rolap.agg.AbstractSegmentBody
getAxisValueSets, getIndicators, getNullAxisFlags, getValueArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keys

final CellKey[] keys

data

final Object[] data
Constructor Detail

SparseSegmentBody

SparseSegmentBody(Map<CellKey,Object> dataToSave,
                  List<Pair<SortedSet<Comparable>,Boolean>> axes)
Method Detail

getSize

protected int getSize()
Specified by:
getSize in class AbstractSegmentBody

getObject

protected Object getObject(int i)
Specified by:
getObject in class AbstractSegmentBody

getValueMap

public Map<CellKey,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 interface SegmentBody
Overrides:
getValueMap in class AbstractSegmentBody
Returns:
Map containing cell values keyed by their coordinates

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