Class DefaultGrid<T>

All Implemented Interfaces:
Grid<T>, Projection<T>
Direct Known Subclasses:
ContextGrid

public class DefaultGrid<T> extends AbstractGrid<T,Map<GridPoint,Object>>
A default implementation of a grid backed by a map.
Author:
Jerry Vos
  • Constructor Details

    • DefaultGrid

      public DefaultGrid(String name, GridAdder<T> adder, GridPointTranslator translator, CellAccessor<T,Map<GridPoint,Object>> accessor, int... size)
      Parameters:
      name - the name of the grid
      adder - the adder for adding new objects to the grid
      translator -
      accessor - the accessor used for accessing grid cells
      size - the size of the space
    • DefaultGrid

      public DefaultGrid(String name, GridAdder<T> adder, GridPointTranslator translator, CellAccessor<T,Map<GridPoint,Object>> accessor, int[] size, int[] origin)
      Parameters:
      name - the name of the grid
      adder - the adder for adding new objects to the grid
      translator -
      accessor - the accessor used for accessing grid cells
      size - the size of the space
      origin - the origin of the space
    • DefaultGrid

      public DefaultGrid(String name, int... size)
      Parameters:
      name - the name of the grid
      size - the size of the space
    • DefaultGrid

      public DefaultGrid(String name, int[] size, int[] origin)
      Parameters:
      name - the name of the grid
      size - the size of the space
      origin - the origin of the space
  • Method Details