Class CellKey.Generator

  • Enclosing interface:
    CellKey

    public abstract static class CellKey.Generator
    extends Object
    • Constructor Detail

      • Generator

        public Generator()
    • Method Detail

      • newCellKey

        public static CellKey newCellKey​(int size)
        Creates a CellKey with a given number of axes.
        Parameters:
        size - Number of axes
        Returns:
        new CellKey
      • newCellKey

        public static CellKey newCellKey​(int[] pos)
        Creates a CellKey populated with the given coordinates.
        Parameters:
        pos - Coordinate array
        Returns:
        CellKey
      • newManyCellKey

        static CellKey newManyCellKey​(int size)
        Creates a CellKey implemented by an array to hold the coordinates, regardless of the size.

        This is used for testing only. The CellKey will fail to compare equal to naturally created keys of size 0, 1, 2 or 3.

        Parameters:
        size - Number of coordinates
        Returns:
        CallKey
      • getOffset

        public static int getOffset​(int[] ordinals,
                                    int[] axisMultipliers)