Package com.facilita.fc.eggPlant
Class Rectangle
- java.lang.Object
-
- com.facilita.fc.eggPlant.Rectangle
-
public class Rectangle extends java.lang.ObjectRepresents an area of the screen.
-
-
Constructor Summary
Constructors Constructor Description Rectangle(int x1, int y1, int x2, int y2)Instantiates a new Rectangle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointbottomRight()Get a Point representing the location of the top left corner of the Rectangle.booleanequals(java.lang.Object other)inthashCode()PointtopLeft()Get a Point representing the location of the top left corner of the Rectangle.java.lang.StringtoString()
-
-
-
Constructor Detail
-
Rectangle
public Rectangle(int x1, int y1, int x2, int y2)Instantiates a new Rectangle.- Parameters:
x1- the x coordinate of the top left cornery1- the y coordinate of the top left cornerx2- the x coordinate of the bottom right cornery2- the y coordinate of the bottom right corner
-
-
Method Detail
-
topLeft
public Point topLeft()
Get a Point representing the location of the top left corner of the Rectangle.- Returns:
- the point
-
bottomRight
public Point bottomRight()
Get a Point representing the location of the top left corner of the Rectangle.- Returns:
- the point
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-