|
Jadex 0.96 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjadex.examples.cleanerworld.single.Location
public class Location
The location represents a location on the world map.
Field Summary | |
---|---|
static double |
DEFAULT_TOLERANCE
Distance, when two locations are considered near. |
double |
x
The x coordinate. |
double |
y
The y coordinate. |
Constructor Summary | |
---|---|
Location(double x,
double y)
Create a new location. |
Method Summary | |
---|---|
double |
getDistance(Location other)
Caculate is a location is near this location. |
boolean |
isNear(Location other)
Check, if two locations are near to each other using the default tolerance. |
boolean |
isNear(Location other,
double tolerance)
Check, if two locations are near to each other. |
String |
toString()
Convert the location to a string representation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double DEFAULT_TOLERANCE
public double x
public double y
Constructor Detail |
---|
public Location(double x, double y)
x
- The x coordinate.y
- The y coordinate.Method Detail |
---|
public double getDistance(Location other)
public boolean isNear(Location other)
public boolean isNear(Location other, double tolerance)
tolerance
- The distance, when two locations are considered near.
public String toString()
toString
in class Object
|
Jadex 0.96 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.