Package mondrian.rolap
Class CellKey.Many
- java.lang.Object
-
- mondrian.rolap.CellKey.Many
-
- All Implemented Interfaces:
Serializable
,CellKey
- Enclosing interface:
- CellKey
public static class CellKey.Many extends Object implements CellKey
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.rolap.CellKey
CellKey.Four, CellKey.Generator, CellKey.Many, CellKey.One, CellKey.Three, CellKey.Two, CellKey.Zero
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Many(int[] ordinals)
Creates a Many.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CellKey.Many
copy()
Returns a mutable copy of this CellKey.boolean
equals(Object o)
int
getAxis(int axis)
Returns theaxis
th axis value.int
getOffset(int[] axisMultipliers)
Returns the offset of the cell in a raster-scan order.int[]
getOrdinals()
Returns the axis keys as an array.int
hashCode()
void
setAxis(int axis, int value)
Sets a given axis.void
setOrdinals(int[] pos)
This method make a copy of the int array parameter.int
size()
Returns the number of axes.String
toString()
-
-
-
Method Detail
-
size
public final int size()
Description copied from interface:CellKey
Returns the number of axes.
-
setOrdinals
public final void setOrdinals(int[] pos)
Description copied from interface:CellKey
This method make a copy of the int array parameter. Throws a RuntimeException if the int array size is not the size of the CellKey.- Specified by:
setOrdinals
in interfaceCellKey
- Parameters:
pos
- Array of axis keys
-
getOrdinals
public final int[] getOrdinals()
Description copied from interface:CellKey
Returns the axis keys as an array.Note: caller should treat the array as immutable. If the contents of the array are modified, behavior is unspecified.
- Specified by:
getOrdinals
in interfaceCellKey
- Returns:
- Array of axis keys
-
setAxis
public void setAxis(int axis, int value)
Description copied from interface:CellKey
Sets a given axis.
-
getAxis
public int getAxis(int axis)
Description copied from interface:CellKey
Returns theaxis
th axis value.
-
copy
public CellKey.Many copy()
Description copied from interface:CellKey
Returns a mutable copy of this CellKey.
-
getOffset
public int getOffset(int[] axisMultipliers)
Description copied from interface:CellKey
Returns the offset of the cell in a raster-scan order.For example, if the axes have lengths {2, 5, 10} then cell (2, 3, 4) has offset
(2 * mulitiplers[0]) + (3 * multipliers[1]) + (4 * multipliers[2])
= (2 * 50) + (3 * 10) + (4 * 1)
= 134The multipliers are the product of the lengths of all later axes, in this case (50, 10, 1).
-
-