Class GHResponse

java.lang.Object
com.graphhopper.GHResponse

public class GHResponse extends Object
Wrapper containing path and error output of GraphHopper.

Author:
Peter Karich
  • Constructor Details

    • GHResponse

      public GHResponse()
  • Method Details

    • add

      public void add(ResponsePath responsePath)
    • getBest

      public ResponsePath getBest()
      Returns the best path.
    • getAll

      public List<ResponsePath> getAll()
      This method returns the best path as well as all alternatives.
    • hasAlternatives

      public boolean hasAlternatives()
      This method returns true if there are alternative paths available besides the best.
    • addDebugInfo

      public void addDebugInfo(String debugInfo)
    • getDebugInfo

      public String getDebugInfo()
    • hasErrors

      public boolean hasErrors()
      This method returns true if one of the paths has an error or if the response itself is erroneous.
    • getErrors

      public List<Throwable> getErrors()
      This method returns all the explicitly added errors and the errors of all paths.
    • addErrors

      public GHResponse addErrors(List<Throwable> errors)
    • addError

      public GHResponse addError(Throwable error)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setHints

      public void setHints(PMap hints)
    • getHints

      public PMap getHints()
    • getHeader

      public String getHeader(String key, String defaultValue)