Class GridDimensionImpl
java.lang.Object
org.refcodes.graphical.GridDimensionImpl
- All Implemented Interfaces:
GridDimension,GridHeightAccessor,GridWidthAccessor
The Class GridDimensionImpl.
-
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.GridDimensionPropertyNested 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 -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInstantiates a new grid dimension impl.GridDimensionImpl(int aWidth, int aHeight) Instantiates a new grid dimension impl. -
Method Summary
Modifier and TypeMethodDescriptionintRetrieves the grid height from the grid height property.intRetrieves 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, waitMethods 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:
getGridWidthin 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:
getGridHeightin interfaceGridHeightAccessor- Returns:
- The grid height stored by the grid height property.
-
toString
-