Package com.targomo.client.api.response
Class PointOfInterestResponse
java.lang.Object
com.targomo.client.api.response.PointOfInterestResponse
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPointOfInterestResponse(TravelOptions travelOptions, org.json.JSONObject result, boolean resultContainsEdgeWeights, long requestStart) Create a response from JSON results, using given travel options -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEdgeWeight(String targetId, Integer travelTime) Add travel time to a targetMap of source IDs - travel timesorg.json.JSONObjectvoidParse results in JSON to travel times map.
-
Constructor Details
-
PointOfInterestResponse
public PointOfInterestResponse(TravelOptions travelOptions, org.json.JSONObject result, boolean resultContainsEdgeWeights, long requestStart) Create a response from JSON results, using given travel options- Parameters:
travelOptions- travel options, from the requestresult- Travel times in JSONresultContainsEdgeWeights- does the result object contain edgeWeight for each POIrequestStart- Start time of execution
-
-
Method Details
-
mapResults
public void mapResults()Parse results in JSON to travel times map. -
addEdgeWeight
Add travel time to a target- Parameters:
targetId- Target IDtravelTime- Travel time for the target
-
getTravelOptions
- Returns:
- the travelOptions
-
getEdgeWeights
Map of source IDs - travel times- Returns:
- travel time map
-
getResult
public org.json.JSONObject getResult() -
getResultAsMap
- Throws:
IOException
-