Class RectangleImpl
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.DimensionAccessor, Dimension.DimensionBuilder<B extends Dimension.DimensionBuilder<B>>, Dimension.DimensionMutator, Dimension.DimensionPropertyNested classes/interfaces inherited from interface org.refcodes.graphical.HeightAccessor
HeightAccessor.HeightBuilder<B extends HeightAccessor.HeightBuilder<B>>, HeightAccessor.HeightMutator, HeightAccessor.HeightPropertyNested classes/interfaces inherited from interface org.refcodes.graphical.Position
Position.PositionBuilder<B extends Position.PositionBuilder<B>>, Position.PositionMutator, Position.PositionPropertyNested classes/interfaces inherited from interface org.refcodes.graphical.PosXAccessor
PosXAccessor.PosXBuilder<B extends PosXAccessor.PosXBuilder<B>>, PosXAccessor.PosXMutator, PosXAccessor.PosXPropertyNested classes/interfaces inherited from interface org.refcodes.graphical.PosYAccessor
PosYAccessor.PosYBuilder<B extends PosYAccessor.PosYBuilder<B>>, PosYAccessor.PosYMutator, PosYAccessor.PosYPropertyNested classes/interfaces inherited from interface org.refcodes.graphical.Rectangle
Rectangle.RectangleBuilder<B extends Rectangle.RectangleBuilder<B>>, Rectangle.RectangleMutator, Rectangle.RectanglePropertyNested classes/interfaces inherited from interface org.refcodes.graphical.WidthAccessor
WidthAccessor.WidthBuilder<B extends WidthAccessor.WidthBuilder<B>>, WidthAccessor.WidthMutator, WidthAccessor.WidthProperty -
Constructor Summary
ConstructorsConstructorDescriptionRectangleImpl(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
-
Constructor Details
-
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.
-
RectangleImpl
-
-
Method Details
-
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.
-
hashCode
-
equals
-