- All Superinterfaces:
GridHeightAccessor
,GridWidthAccessor
- All Known Subinterfaces:
GridDimension.GridDimensionAccessor
,GridDimension.GridDimensionProperty
,Raster
,Raster.RasterAccessor
,Raster.RasterProperty
- All Known Implementing Classes:
GridDimensionImpl
,RasterImpl
,RasterPropertyBuilder
Provides an accessor for a
GridDimension
property.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Provides an accessor for aGridDimension
property.static interface
The Interface GridDimensionBuilder.static interface
The Interface GridDimensionMutator.static interface
The Interface GridDimensionProperty.Nested classes/interfaces inherited from interface org.refcodes.graphical.GridHeightAccessor
GridHeightAccessor.GridHeightBuilder<B extends GridHeightAccessor.GridHeightBuilder<B>>, GridHeightAccessor.GridHeightMutator, GridHeightAccessor.GridHeightProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.GridWidthAccessor
GridWidthAccessor.GridWidthBuilder<B extends GridWidthAccessor.GridWidthBuilder<B>>, GridWidthAccessor.GridWidthMutator, GridWidthAccessor.GridWidthProperty
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
equals
(GridDimension aGridDimensionA, GridDimension aGridDimensionB) Equals.default boolean
isInBounds
(int aPositionX, int aPositionY) Tests whether the given position is inside of the bounds of the grid.default boolean
isInBounds
(Position aPosition) Tests whether the given position is inside of the bounds of the grid.default boolean
isInHeight
(int aPositionY) Tests whether the given y-position is inside of the bounds of the grid's height.default boolean
isInWidth
(int aPositionX) Tests whether the given x-position is inside of the bounds of the grid's width.Methods inherited from interface org.refcodes.graphical.GridHeightAccessor
getGridHeight
Methods inherited from interface org.refcodes.graphical.GridWidthAccessor
getGridWidth
-
Method Details
-
isInBounds
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
Equals.- Parameters:
aGridDimensionA
- the grid dimension AaGridDimensionB
- the grid dimension B- Returns:
- true, if successful
-