Interface Located

All Known Implementing Classes:
GoogleMapsSearchServer.SearchResult, Located.Static, OsmSearchServer.SearchResult, SearchServer.Result

public interface Located
Interface to provide a location for an object, as a PointD with longitude, latitude coordinates.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Interface Description
    static class  Located.Static
    A base implementation for read-only locations
  • Method Summary

    Modifier and Type Method Description
    PointD getLonLat()
    Returns the longitude, latitude for this object or null if this object doesn't have a location.
    boolean setLonLat​(double lon, double lat)
    Set the longitude, latitude for this object.
  • Method Details

    • getLonLat

      PointD getLonLat()
      Returns the longitude, latitude for this object or null if this object doesn't have a location.
      Returns:
      the longitude, latitude as a PointD
    • setLonLat

      boolean setLonLat​(double lon, double lat)
      Set the longitude, latitude for this object. Returns true if the change occurred, i.e. the operation was legal. Use setLonLat(getLonLat().x, getLonLat().y) to check without side-effect.
      Parameters:
      lon - the new longitude
      lat - the new latitude
      Returns:
      if it was actually changed