Constructor and Description |
---|
Rectangle()
Instantiates a new Rectangle.
|
Rectangle(double x,
double y,
double width,
double height)
Creates a new instance of Rectangle
|
Modifier and Type | Method and Description |
---|---|
Rectangle |
clone() |
boolean |
equals(Object o) |
double |
getHeight()
Height
|
double |
getWidth()
Width
|
double |
getX()
X coordinate
|
double |
getY()
Y coordinate
|
int |
hashCode() |
void |
setHeight(double value)
Height
|
void |
setWidth(double value)
Width
|
void |
setX(double value)
X coordinate
|
void |
setY(double value)
Y coordinate
|
String |
toString() |
public Rectangle()
public Rectangle(double x, double y, double width, double height)
Creates a new instance of Rectangle
x
- X position of rectangley
- Y position of Rectanglewidth
- Width of Rectangleheight
- Height of Rectanglepublic final double getHeight()
Height
public final double getWidth()
Width
public final double getX()
X coordinate
public final double getY()
Y coordinate
public final void setHeight(double value)
Height
value
- the valuepublic final void setWidth(double value)
Width
value
- the valuepublic final void setX(double value)
X coordinate
value
- the valuepublic final void setY(double value)
Y coordinate
value
- the value