Interface ILocation
-
public interface ILocation
A location on the virtual map.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getDistance(ILocation other)
Caculate the distance to another location.double
getX()
Get the x of this Location.double
getY()
Get the y of this Location.boolean
isNear(ILocation other)
Check, if the other location is in range.
-
-
-
Method Detail
-
getX
double getX()
Get the x of this Location. The x-coordinate.- Returns:
- x
-
getY
double getY()
Get the y of this Location. The y-coordinate.- Returns:
- y
-
getDistance
double getDistance(ILocation other)
Caculate the distance to another location.- Returns:
- The distance.
-
isNear
boolean isNear(ILocation other)
Check, if the other location is in range. E.g. when the chargin station is near to the cleaner it can recharge, etc.- Returns:
- True, if the given locations is near to this location.
-
-