public class GeocodingResponse extends Object implements Iterable<Candidate>
wasErrorResponse()==true), i.e. error value is set -
see ErrorDescriptionwasErrorResponse()==false) the candidates value is set
Note: It is immutable with a private constructor since it is only meant to be created from the returned json object.
Note: This is not the complete response from the REST service - only relevant information is captured, the remainder
is discarded.
| Modifier and Type | Method and Description |
|---|---|
static GeocodingResponse |
createFromJson(String jsonString)
Creates the response from a JSON String
|
String |
getCompleteJsonResponseAsString() |
ErrorDescription |
getError() |
Candidate |
getRepresentativeCandidate() |
DefaultTargetCoordinate |
getRepresentativeGeocodeOfRequest() |
boolean |
isEmpty() |
Iterator<Candidate> |
iterator() |
String |
toString()
Pretty prints the
GeocodingResponse, i.e. |
boolean |
wasErrorResponse() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static GeocodingResponse createFromJson(String jsonString)
jsonString - to be parsedpublic ErrorDescription getError()
ErrorDescription is returnedpublic boolean wasErrorResponse()
true if error was recorded; false otherwisepublic String getCompleteJsonResponseAsString()
public DefaultTargetCoordinate getRepresentativeGeocodeOfRequest()
NoSuchElementException - when response contains no candidatespublic Candidate getRepresentativeCandidate()
NoSuchElementException - when response contains no candidatespublic String toString()
GeocodingResponse, i.e. with indention and line breaks.public boolean isEmpty()
Copyright © 2017. All rights reserved.