Package mondrian.rolap.agg
Class DenseDoubleSegmentBody
- java.lang.Object
-
- mondrian.rolap.agg.AbstractSegmentBody
-
- mondrian.rolap.agg.DenseDoubleSegmentBody
-
- All Implemented Interfaces:
Serializable,SegmentBody
class DenseDoubleSegmentBody extends AbstractSegmentBody
Implementation of a segment body which stores the data inside a dense primitive array of double precision numbers.- Author:
- LBoudreau
-
-
Field Summary
-
Fields inherited from class mondrian.rolap.agg.AbstractSegmentBody
axisValueSets
-
-
Constructor Summary
Constructors Constructor Description DenseDoubleSegmentBody(BitSet nullValues, double[] values, List<Pair<SortedSet<Comparable>,Boolean>> axes)Creates a DenseDoubleSegmentBody.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetEffectiveSize()Returns the amount of non-null elements.BitSetgetNullValueIndicators()Returns a bit-set indicating whether values are null.protected ObjectgetObject(int i)protected intgetSize()Returns the overall amount of stored elements, including those, that are considered to be null.ObjectgetValueArray()Returns an array of values.StringtoString()-
Methods inherited from class mondrian.rolap.agg.AbstractSegmentBody
getAxisValueSets, getNullAxisFlags, getValueMap
-
-
-
-
Constructor Detail
-
DenseDoubleSegmentBody
DenseDoubleSegmentBody(BitSet nullValues, double[] values, List<Pair<SortedSet<Comparable>,Boolean>> axes)
Creates a DenseDoubleSegmentBody.Stores the given array of cell values and null indicators; caller must not modify them afterwards.
- Parameters:
nullValues- A bit-set indicating whether values are null. Each position in the bit-set corresponds to an offset in the value array. If position is null, the corresponding entry in the value array will also be 0.values- Cell valuesaxes- Axes
-
-
Method Detail
-
getValueArray
public Object getValueArray()
Description copied from interface:SegmentBodyReturns an array of values.Use only for dense segments.
- Specified by:
getValueArrayin interfaceSegmentBody- Overrides:
getValueArrayin classAbstractSegmentBody- Returns:
- An array of values
-
getNullValueIndicators
public BitSet getNullValueIndicators()
Description copied from interface:SegmentBodyReturns a bit-set indicating whether values are null. The ordinals in the bit-set correspond to the indexes in the array returned fromSegmentBody.getValueArray().Use only for dense segments of native values.
- Specified by:
getNullValueIndicatorsin interfaceSegmentBody- Overrides:
getNullValueIndicatorsin classAbstractSegmentBody- Returns:
- Indicators
-
getSize
protected int getSize()
Description copied from class:AbstractSegmentBodyReturns the overall amount of stored elements, including those, that are considered to be null.- Specified by:
getSizein classAbstractSegmentBody- Returns:
- the size of stored data
-
getEffectiveSize
protected int getEffectiveSize()
Description copied from class:AbstractSegmentBodyReturns the amount of non-null elements. This amount is equal to number of elements thatgetValueMap().entrySet().iterator()is returned. By default the method executesgetSize().- Overrides:
getEffectiveSizein classAbstractSegmentBody- Returns:
- the effective size of stored data
-
getObject
protected Object getObject(int i)
- Specified by:
getObjectin classAbstractSegmentBody
-
-