public class

GeocodingResult

extends Object
java.lang.Object
   ↳ com.carto.geocoding.GeocodingResult

Class Overview

A geocoding result object describing address, features (geometry) and rank of the result.

Summary

Public Constructors
GeocodingResult(Projection projection, GeocodingAddress address, float rank, FeatureCollection featureCollection)
Constructs a GeocodingResult from a projection, address, rank and feature collection.
Public Methods
synchronized void delete()
boolean equals(Object obj)
Checks if this object is equal to the specified object.
GeocodingAddress getAddress()
Returns the address of the result.
FeatureCollection getFeatureCollection()
Returns the feature collection of the result.
Projection getProjection()
Returns the projection of the geometry in the result.
float getRank()
Returns the rank of the result.
int hashCode()
Returns the hash value of this object.
String toString()
Creates a string representation of this result object, useful for logging.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GeocodingResult (Projection projection, GeocodingAddress address, float rank, FeatureCollection featureCollection)

Constructs a GeocodingResult from a projection, address, rank and feature collection.

Parameters
projection The projection used for the geometry of the result.
address The address of the result.
rank The relative ranking of the result (in range 0..1).
featureCollection The geometry (features) associated with the result.

Public Methods

public synchronized void delete ()

public boolean equals (Object obj)

Checks if this object is equal to the specified object.

Parameters
obj The reference object.
Returns
  • True when objects are equal, false otherwise.

public GeocodingAddress getAddress ()

Returns the address of the result.

Returns
  • The address of the result.

public FeatureCollection getFeatureCollection ()

Returns the feature collection of the result.

Returns
  • The feature collection of the result.

public Projection getProjection ()

Returns the projection of the geometry in the result.

Returns
  • The projection of the geometry in the result.

public float getRank ()

Returns the rank of the result.
The rank is a normalized number between 0 and 1, 1 meaning a perfect match.

Returns
  • The rank of the result.

public int hashCode ()

Returns the hash value of this object.

Returns
  • The hash value of this object.

public String toString ()

Creates a string representation of this result object, useful for logging.

Returns
  • The string representation of this result object.