|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectworld.Location
A location.
Field Summary | |
static java.lang.String |
CONTINENTAL_PART
A special value for the property of @see #islandName indicating this location lies on the continental part of the land. |
java.lang.String |
continentName
A name of the continentName this location belongs to. |
java.lang.String |
islandName
A name of the island this point lies on or a special value of @see #CONTINENTAL_PART. |
int |
x
The x coordinate of the object. |
int |
y
The y coordinate of the object. |
Constructor Summary | |
Location(int x,
int y)
Constructor. |
Method Summary | |
boolean |
equals(java.lang.Object other)
|
static double |
GetDistance(Location x,
Location y)
Gets the distance between two locations. |
boolean |
IsEqual(Location other)
Compares this location to the other one. |
boolean |
IsInRange(int x1,
int y1,
int x2,
int y2)
Gets a boolean value indicating whether this location lies in the given rectangle. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int x
public int y
public java.lang.String continentName
public static final java.lang.String CONTINENTAL_PART
public java.lang.String islandName
Constructor Detail |
public Location(int x, int y)
x
- The x coordinate of object.y
- The y coordinate of object.Method Detail |
public boolean IsEqual(Location other)
other
- The location this one is to be compared to.
public boolean equals(java.lang.Object other)
Object.equals(java.lang.Object)
public static double GetDistance(Location x, Location y)
x
- One of the points.y
- The second of the points.
public boolean IsInRange(int x1, int y1, int x2, int y2)
x1
- The X coordinate of the first corner of the rectangle.y1
- The Y coordinate of the first corner of the rectangle.x2
- The X coordinate of the second corner of the rectangle.y2
- The Y coordinate of the second corner of the rectangle.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |