Interface GridDimension

All Superinterfaces:
GridHeightAccessor, GridWidthAccessor
All Known Subinterfaces:
GridDimension.GridDimensionAccessor, GridDimension.GridDimensionProperty, Raster, Raster.RasterAccessor, Raster.RasterProperty
All Known Implementing Classes:
GridDimensionImpl, RasterImpl, RasterPropertyBuilder

public interface GridDimension extends GridHeightAccessor, GridWidthAccessor
Provides an accessor for a GridDimension property.
  • Method Details

    • isInBounds

      default boolean isInBounds(Position aPosition)
      Tests whether the given position is inside of the bounds of the grid. The x and y coordinates must be greater than or equals to 0 and smaller than the grid width (x) and grid height (y).
      Parameters:
      aPosition - The position for which to determine if it is in bounds.
      Returns:
      True in case the given position is in bounds.
    • isInBounds

      default boolean isInBounds(int aPositionX, int aPositionY)
      Tests whether the given position is inside of the bounds of the grid. The x- and y-coordinates must be greater or equals to 0 and smaller than the grid width (x) and grid height (y).
      Parameters:
      aPositionX - The x-position for which to determine if it is in bounds regarding the grid width.
      aPositionY - The y-position for which to determine if it is in bounds regarding the grid height.
      Returns:
      True in case the given position is in bounds.
    • isInWidth

      default boolean isInWidth(int aPositionX)
      Tests whether the given x-position is inside of the bounds of the grid's width. The x-coordinate must be greater than or equals to 0 and smaller than the grid width.
      Parameters:
      aPositionX - The x-position for which to determine if it is in bounds regarding the grid width.
      Returns:
      True in case the given x-position is in bounds.
    • isInHeight

      default boolean isInHeight(int aPositionY)
      Tests whether the given y-position is inside of the bounds of the grid's height. The y-coordinate must be greater than or equals to 0 and smaller than the grid height.
      Parameters:
      aPositionY - The y-position for which to determine if it is in bounds regarding the grid height.
      Returns:
      True in case the given y-position is in bounds.
    • equals

      static boolean equals(GridDimension aGridDimensionA, GridDimension aGridDimensionB)
      Equals.
      Parameters:
      aGridDimensionA - the grid dimension A
      aGridDimensionB - the grid dimension B
      Returns:
      true, if successful