/** * This method returns true if one of the paths has an error or if the response itself is * erroneous. */ public boolean hasErrors() { if (!errors.isEmpty()) return true; for (PathWrapper ar : pathWrappers) { if (ar.hasErrors()) return true; } return false; }
private void check(String method) { if (hasErrors()) { throw new RuntimeException("You cannot call " + method + " if response contains errors. Check this with ghResponse.hasErrors(). " + "Errors are: " + getErrors()); } }
@Override public String toString() { String str = "nodes:" + pointList.getSize() + "; " + pointList.toString(); if (instructions != null && !instructions.isEmpty()) str += ", " + instructions.toString(); if (hasErrors()) str += ", " + errors.toString(); return str; }
PathWrapper createPathWrapper(JsonNode path, boolean tmpElevation, boolean turnDescription) { PathWrapper pathWrapper = new PathWrapper(); pathWrapper.addErrors(readErrors(path)); if (pathWrapper.hasErrors()) return pathWrapper;
pathMerger.doWork(rsp, altPaths, trMap.getWithFallBack(Locale.US)); if (rsp.hasErrors()) { errors.add("response for " + algoEntry + " contains errors. Expected distance: " + oneRun.getDistance() + ", expected points: " + oneRun + ". " + queryList + ", errors:" + rsp.getErrors());
protected void onPostExecute(PathWrapper resp) { if (!resp.hasErrors()) { log("from:" + fromLat + "," + fromLon + " to:" + toLat + "," + toLon + " found path with distance:" + resp.getDistance() / 1000f + ", nodes:" + resp.getPoints().getSize() + ", time:" + time + " " + resp.getDebugInfo()); logUser("the route is " + (int) (resp.getDistance() / 100) / 10f + "km long, time:" + resp.getTime() / 60000f + "min, debug:" + time); pathLayer = createPathLayer(resp); mapView.map().layers().add(pathLayer); mapView.map().updateMap(true); } else { logUser("Error:" + resp.getErrors()); } shortestPathRunning = false; } }.execute();
/** * This method returns true if one of the paths has an error or if the response itself is * erroneous. */ public boolean hasErrors() { if (!errors.isEmpty()) return true; for (PathWrapper ar : pathWrappers) { if (ar.hasErrors()) return true; } return false; }
/** * This method returns true if one of the paths has an error or if the response itself is * erroneous. */ public boolean hasErrors() { if (!errors.isEmpty()) return true; for (PathWrapper ar : pathWrappers) { if (ar.hasErrors()) return true; } return false; }
/** * This method returns true if one of the paths has an error or if the response itself is * errornous. */ public boolean hasErrors() { if (!errors.isEmpty()) return true; for (PathWrapper ar : pathWrappers) { if (ar.hasErrors()) return true; } return false; }
private void check(String method) { if (hasErrors()) { throw new RuntimeException("You cannot call " + method + " if response contains errors. Check this with ghResponse.hasErrors(). " + "Errors are: " + getErrors()); } }
private void check(String method) { if (hasErrors()) { throw new RuntimeException("You cannot call " + method + " if response contains errors. Check this with ghResponse.hasErrors(). " + "Errors are: " + getErrors()); } }
private void check( String method ) { if (hasErrors()) { throw new RuntimeException("You cannot call " + method + " if response contains errors. Check this with ghResponse.hasErrors(). " + "Errors are: " + getErrors()); } }
@Override public String toString() { String str = "nodes:" + pointList.getSize() + "; " + pointList.toString(); if (instructions != null && !instructions.isEmpty()) str += ", " + instructions.toString(); if (hasErrors()) str += ", " + errors.toString(); return str; }
@Override public String toString() { String str = "nodes:" + pointList.getSize() + "; " + pointList.toString(); if (instructions != null && !instructions.isEmpty()) str += ", " + instructions.toString(); if (hasErrors()) str += ", " + errors.toString(); return str; }
@Override public String toString() { String str = "nodes:" + pointList.getSize() + "; " + pointList.toString(); if (instructions != null && !instructions.isEmpty()) str += ", " + instructions.toString(); if (hasErrors()) str += ", " + errors.toString(); return str; }
pathMerger.doWork(rsp, altPaths, trMap.getWithFallBack(Locale.US)); if (rsp.hasErrors()) { errors.add("response for " + algoEntry + " contains errors. Expected distance: " + oneRun.getDistance() + ", expected points: " + oneRun + ". " + queryList + ", errors:" + rsp.getErrors());
pathMerger.doWork(rsp, altPaths, trMap.getWithFallBack(Locale.US)); if (rsp.hasErrors())
pathMerger.doWork(rsp, altPaths, trMap.getWithFallBack(Locale.US)); if (rsp.hasErrors()) { errors.add("response for " + algoEntry + " contains errors. Expected distance: " + oneRun.getDistance() + ", expected points: " + oneRun + ". " + queryList + ", errors:" + rsp.getErrors());