Package org.opennms.features.geocoder
Class GeocoderResult
- java.lang.Object
-
- org.opennms.features.geocoder.GeocoderResult
-
public class GeocoderResult extends java.lang.Object
The resolution result of theGeocoderService
. This allows to distinguish between no and unsuccessful result.- Author:
- mvrueden
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeocoderResult.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeocoderResult.Builder
builder()
static GeocoderResult.Builder
error(java.lang.Exception exception)
static GeocoderResult.Builder
error(java.lang.String errorMessage)
java.lang.String
getAddress()
Coordinates
getCoordinates()
java.lang.Throwable
getThrowable()
boolean
hasError()
boolean
isEmpty()
static GeocoderResult.Builder
noResult(java.lang.String address)
static GeocoderResult.Builder
success(java.lang.String address, double lng, double lat)
-
-
-
Method Detail
-
hasError
public boolean hasError()
-
isEmpty
public boolean isEmpty()
-
getThrowable
public java.lang.Throwable getThrowable()
-
getCoordinates
public Coordinates getCoordinates()
-
getAddress
public java.lang.String getAddress()
-
builder
public static GeocoderResult.Builder builder()
-
success
public static GeocoderResult.Builder success(java.lang.String address, double lng, double lat)
-
noResult
public static GeocoderResult.Builder noResult(java.lang.String address)
-
error
public static GeocoderResult.Builder error(java.lang.String errorMessage)
-
error
public static GeocoderResult.Builder error(java.lang.Exception exception)
-
-