Interface ILocation

All Known Implementing Classes:
Location

public interface ILocation
A location on the virtual map.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Caculate the distance to another location.
    double
    Get the x of this Location.
    double
    Get the y of this Location.
    boolean
    Check, if the other location is in range.
  • Method Details

    • 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.