java.lang.Object
org.refcodes.graphical.GridDimensionImpl
- All Implemented Interfaces:
GridDimension
,GridHeightAccessor
,GridWidthAccessor
The Class GridDimensionImpl.
- Author:
- steiner
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.graphical.GridDimension
GridDimension.GridDimensionAccessor, GridDimension.GridDimensionBuilder<B extends GridDimension.GridDimensionBuilder<B>>, GridDimension.GridDimensionMutator, GridDimension.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
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Instantiates a new grid dimension impl.GridDimensionImpl
(int aWidth, int aHeight) Instantiates a new grid dimension impl. -
Method Summary
Modifier and TypeMethodDescriptionint
Retrieves the grid height from the grid height property.int
Retrieves the grid width from the grid width property.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.refcodes.graphical.GridDimension
isInBounds, isInBounds, isInHeight, isInWidth
-
Field Details
-
_width
protected int _width -
_height
protected int _height
-
-
Constructor Details
-
GridDimensionImpl
protected GridDimensionImpl()Instantiates a new grid dimension impl. -
GridDimensionImpl
public GridDimensionImpl(int aWidth, int aHeight) Instantiates a new grid dimension impl.- Parameters:
aWidth
- the widthaHeight
- the height
-
-
Method Details
-
getGridWidth
public int getGridWidth()Retrieves the grid width from the grid width property.- Specified by:
getGridWidth
in interfaceGridWidthAccessor
- Returns:
- The grid width stored by the grid width property.
-
getGridHeight
public int getGridHeight()Retrieves the grid height from the grid height property.- Specified by:
getGridHeight
in interfaceGridHeightAccessor
- Returns:
- The grid height stored by the grid height property.
-
toString
-