- java.lang.Object
-
- org.refcodes.graphical.RectangleImpl
-
- All Implemented Interfaces:
Dimension,HeightAccessor,Position,PosXAccessor,PosYAccessor,Rectangle,WidthAccessor
public class RectangleImpl extends Object implements Rectangle
The classRectangleImplimplements theRectangleinterface.
-
-
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
Constructors Constructor Description RectangleImpl(int aPositionX, int aPositionY, int aWidth, int aHeight)Constructs aRectanglewith the given metrics.RectangleImpl(Position aPosition, Dimension aDimension)Constructs aRectanglewith the given metrics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)intgetHeight()Retrieves the height from the height property.intgetPositionX()Retrieves the X position from the X position property.intgetPositionY()Retrieves the Y position from the Y position property.intgetWidth()Retrieves the width from the width property.inthashCode()
-
-
-
Constructor Detail
-
RectangleImpl
public RectangleImpl(int aPositionX, int aPositionY, int aWidth, int aHeight)Constructs aRectanglewith 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.
-
-
Method Detail
-
getWidth
public int getWidth()
Retrieves the width from the width property.- Specified by:
getWidthin interfaceWidthAccessor- Returns:
- The width stored by the width property.
-
getHeight
public int getHeight()
Retrieves the height from the height property.- Specified by:
getHeightin interfaceHeightAccessor- Returns:
- The height stored by the height property.
-
getPositionX
public int getPositionX()
Retrieves the X position from the X position property.- Specified by:
getPositionXin 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:
getPositionYin interfacePosYAccessor- Returns:
- The Y position stored by the Y position property.
-
-