public class PlaceLink extends DiscoveryResult
Place
.
Note: detailed Place
information is retrieved by way of the
PlaceRequest
returned from a call to the
getDetailsRequest()
method.
DiscoveryResult.ResultType
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<java.lang.String> |
getAlternativeReferenceIds(java.lang.String name)
Get a list of alternative identifiers of the same reference identifier for
a specific domain.
|
double |
getAverageRating()
Gets the average rating for a
Place . |
GeoBoundingBox |
getBoundingBox()
Gets the
GeoBoundingBox describing a range of coordinates that correspond to the
Place . |
Category |
getCategory()
Gets the
Category for the Place . |
PlaceRequest |
getDetailsRequest()
Gets the request to retrieve the
Place details. |
double |
getDistance()
Gets the distance to the
Place , in meters. |
GeoCoordinate |
getPosition()
Gets the
GeoCoordinate representing the geographical position of
the Place . |
java.lang.String |
getReference(java.lang.String name)
Get the reference identifier for a specific domain.
|
int |
hashCode() |
boolean |
isSponsored()
Determines whether the search result is sponsored.
|
getIconUrl, getId, getResultType, getTitle, getVicinity
public GeoCoordinate getPosition()
GeoCoordinate
representing the geographical position of
the Place
.GeoCoordinate
public GeoBoundingBox getBoundingBox()
GeoBoundingBox
describing a range of coordinates that correspond to the
Place
. Typically, bounding boxes are associated with places such as cities and
countries.
This bounding box does not necessarily have the location from getPosition()
as its
center. For example, if the search was performed with a street name, this bounding box may be
one that contains the entire street, while getPosition()
can be any point along the
street.
Note: bounding box information for a Place
is optional, so a call to this method
could return null
.
GeoBoundingBox
containing the Place
(could be null
)public double getDistance()
Place
, in meters.public double getAverageRating()
Place
.
Note: the average rating is set to zero for places with no ratings.
public Category getCategory()
Category
for the Place
.
Note: a category is optional (especially when offline), so a call to
this method could return null
.
Category
public PlaceRequest getDetailsRequest()
Place
details.PlaceRequest
to retrieve the Place
detailspublic boolean isSponsored()
public java.lang.String getReference(java.lang.String name)
BUILDING_ID_REFERENCE_NAME
.
NOTE: A reference will not be returned if it has not been added to the request using
Request<T>#addReference
.name
- The reference name.public java.util.List<java.lang.String> getAlternativeReferenceIds(java.lang.String name)
PlacesBaseRequest#setReferences
function.name
- The reference name.public int hashCode()
hashCode
in class DiscoveryResult
public boolean equals(java.lang.Object obj)
equals
in class DiscoveryResult