mondrian.rolap.agg
Class AbstractSegmentBody

java.lang.Object
  extended by mondrian.rolap.agg.AbstractSegmentBody
All Implemented Interfaces:
Serializable, SegmentBody
Direct Known Subclasses:
DenseDoubleSegmentBody, DenseIntSegmentBody, DenseObjectSegmentBody, SparseSegmentBody

abstract class AbstractSegmentBody
extends Object
implements SegmentBody

Abstract implementation of a SegmentBody.

Author:
LBoudreau

Field Summary
protected  SortedSet<Comparable>[] axisValueSets
           
 
Constructor Summary
AbstractSegmentBody(List<Pair<SortedSet<Comparable>,Boolean>> axes)
           
 
Method Summary
 SortedSet<Comparable>[] getAxisValueSets()
          Returns the cached axis value sets to be used as an initializer for the segment's axis.
 BitSet getIndicators()
          Returns a bitset indicating whether values are null.
 boolean[] getNullAxisFlags()
          Returns an array of boolean values which identify which axis of the cached segment contained null values.
protected abstract  Object getObject(int i)
           
protected abstract  int getSize()
           
 Object getValueArray()
          Returns an array of values.
 Map<CellKey,Object> getValueMap()
          Converts contents of this segment into a cellkey/value map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

axisValueSets

protected final SortedSet<Comparable>[] axisValueSets
Constructor Detail

AbstractSegmentBody

public AbstractSegmentBody(List<Pair<SortedSet<Comparable>,Boolean>> axes)
Method Detail

getAxisValueSets

public SortedSet<Comparable>[] getAxisValueSets()
Description copied from interface: SegmentBody
Returns the cached axis value sets to be used as an initializer for the segment's axis.

Specified by:
getAxisValueSets in interface SegmentBody
Returns:
An array of SortedSets which was cached previously.

getNullAxisFlags

public boolean[] getNullAxisFlags()
Description copied from interface: SegmentBody
Returns an array of boolean values which identify which axis of the cached segment contained null values.

Specified by:
getNullAxisFlags in interface SegmentBody
Returns:
An array of boolean values.

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
Returns:
Map containing cell values keyed by their coordinates

getValueArray

public Object getValueArray()
Description copied from interface: SegmentBody
Returns an array of values. Use only for dense segments.

Specified by:
getValueArray in interface SegmentBody
Returns:
An array of values

getIndicators

public BitSet getIndicators()
Description copied from interface: SegmentBody
Returns a bitset indicating whether values are null. Use only for dense segments.

Specified by:
getIndicators in interface SegmentBody
Returns:
Indicators

getSize

protected abstract int getSize()

getObject

protected abstract Object getObject(int i)

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