java.lang.Object
org.refcodes.graphical.RectangleImpl
- All Implemented Interfaces:
Dimension
,HeightAccessor
,Position
,PosXAccessor
,PosYAccessor
,Rectangle
,WidthAccessor
The class
RectangleImpl
implements the Rectangle
interface.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.graphical.Dimension
Dimension.DimensionBuilder<B extends Dimension.DimensionBuilder<B>>, Dimension.DimensionMutator, Dimension.DimensionProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.HeightAccessor
HeightAccessor.HeightBuilder<B extends HeightAccessor.HeightBuilder<B>>, HeightAccessor.HeightMutator, HeightAccessor.HeightProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.Position
Position.PositionBuilder<B extends Position.PositionBuilder<B>>, Position.PositionMutator, Position.PositionProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.PosXAccessor
PosXAccessor.PosXBuilder<B extends PosXAccessor.PosXBuilder<B>>, PosXAccessor.PosXMutator, PosXAccessor.PosXProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.PosYAccessor
PosYAccessor.PosYBuilder<B extends PosYAccessor.PosYBuilder<B>>, PosYAccessor.PosYMutator, PosYAccessor.PosYProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.Rectangle
Rectangle.RectangleBuilder<B extends Rectangle.RectangleBuilder<B>>, Rectangle.RectangleMutator, Rectangle.RectangleProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.WidthAccessor
WidthAccessor.WidthBuilder<B extends WidthAccessor.WidthBuilder<B>>, WidthAccessor.WidthMutator, WidthAccessor.WidthProperty
-
Constructor Summary
ConstructorDescriptionRectangleImpl
(int aPositionX, int aPositionY, int aWidth, int aHeight) Constructs aRectangle
with the given metrics.RectangleImpl
(Position aPosition, Dimension aDimension) Constructs aRectangle
with the given metrics. -
Method Summary
-
Constructor Details
-
RectangleImpl
public RectangleImpl(int aPositionX, int aPositionY, int aWidth, int aHeight) Constructs aRectangle
with the given metrics.- Parameters:
aPositionX
- The X position of the rectangle.aPositionY
- The Y position of the rectangle.aWidth
- The width of the rectangle.aHeight
- The height of the rectangle.
-
RectangleImpl
Constructs aRectangle
with the given metrics.- Parameters:
aPosition
- The position of the rectangle.aDimension
- The dimension of the rectangle.
-
-
Method Details
-
getWidth
public int getWidth()Retrieves the width from the width property.- Specified by:
getWidth
in interfaceWidthAccessor
- Returns:
- The width stored by the width property.
-
getHeight
public int getHeight()Retrieves the height from the height property.- Specified by:
getHeight
in interfaceHeightAccessor
- Returns:
- The height stored by the height property.
-
getPositionX
public int getPositionX()Retrieves the X position from the X position property.- Specified by:
getPositionX
in interfacePosXAccessor
- Returns:
- The X position stored by the X position property.
-
getPositionY
public int getPositionY()Retrieves the Y position from the Y position property.- Specified by:
getPositionY
in interfacePosYAccessor
- Returns:
- The Y position stored by the Y position property.
-
hashCode
public int hashCode() -
equals
-