Class CellKey.Zero

java.lang.Object
mondrian.rolap.CellKey.Zero
All Implemented Interfaces:
Serializable, CellKey
Enclosing interface:
CellKey

public static class CellKey.Zero extends Object implements CellKey
See Also:
  • Field Details

  • Method Details

    • copy

      public CellKey.Zero copy()
      Description copied from interface: CellKey
      Returns a mutable copy of this CellKey.
      Specified by:
      copy in interface CellKey
      Returns:
      Mutable copy
    • 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)
      = 134

      The multipliers are the product of the lengths of all later axes, in this case (50, 10, 1).

      Specified by:
      getOffset in interface CellKey
      Parameters:
      axisMultipliers - For each axis, the product of the lengths of later axes
      Returns:
      The raster-scan ordinal of this cell
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • size

      public int size()
      Description copied from interface: CellKey
      Returns the number of axes.
      Specified by:
      size in interface CellKey
      Returns:
      number of axes
    • getOrdinals

      public 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 interface CellKey
      Returns:
      Array of axis keys
    • setOrdinals

      public 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 interface CellKey
      Parameters:
      pos - Array of axis keys
    • getAxis

      public int getAxis(int axis)
      Description copied from interface: CellKey
      Returns the axisth axis value.
      Specified by:
      getAxis in interface CellKey
      Parameters:
      axis - Axis ordinal
      Returns:
      Value of the axisth axis
    • setAxis

      public void setAxis(int axis, int value)
      Description copied from interface: CellKey
      Sets a given axis.
      Specified by:
      setAxis in interface CellKey
      Parameters:
      axis - Axis ordinal
      value - Value