- 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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceProvides an accessor for aGridDimensionproperty.static interfaceThe Interface GridDimensionBuilder.static interfaceThe Interface GridDimensionMutator.static interfaceThe Interface GridDimensionProperty.Nested classes/interfaces inherited from interface org.refcodes.graphical.GridHeightAccessor
GridHeightAccessor.GridHeightBuilder<B extends GridHeightAccessor.GridHeightBuilder<B>>, GridHeightAccessor.GridHeightMutator, GridHeightAccessor.GridHeightPropertyNested 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 booleanequals(GridDimension aGridDimensionA, GridDimension aGridDimensionB) Equals.default booleanisInBounds(int aPositionX, int aPositionY) Tests whether the given position is inside of the bounds of the grid.default booleanisInBounds(Position aPosition) Tests whether the given position is inside of the bounds of the grid.default booleanisInHeight(int aPositionY) Tests whether the given y-position is inside of the bounds of the grid's height.default booleanisInWidth(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
getGridHeightMethods 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
-