com.googlecode.placesapiclient.client.entity.PlacePrediction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of places-api-client Show documentation
Show all versions of places-api-client Show documentation
Java client for Google Places service
The newest version!
package com.googlecode.placesapiclient.client.entity;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*/
public class PlacePrediction {
public PlacePrediction() {
termsMap = new HashMap();
typeList = new ArrayList();
matchedSubstringList = new ArrayList();
}
/**
* Contains the human-readable name for the returned result. For establishment results, this is usually the business name.
*/
protected String description;
/**
* Contains a unique token that you can use to retrieve additional information about this place in a Place Details request.
* You can store this token and use it at any time in future to refresh cached data about this Place, but the same token
* is not guaranteed to be returned for any given Place across different searches.
*/
protected String reference;
/**
*id contains a unique stable identifier denoting this place. This identifier may not be used to retrieve information about this place,
* but can be used to consolidate data about this Place, and to verify the identity of a Place across separate searches.
*/
protected String id;
/**
* Contains an map of terms identifying each section of the returned description (a section of the description is generally terminated with a comma).
* Each entry in the map has a key field, containing the text of the term, and an offset (value) field, defining the start position of this term in the description, measured in Unicode characters.
*/
protected Map termsMap;
/**
* The returned types of Place.
*/
protected List typeList;
/**
* These describe the location of the entered term in the prediction result text, so that the term can be highlighted if desired.
*/
protected List matchedSubstringList;
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getReference() {
return reference;
}
public void setReference(String reference) {
this.reference = reference;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Map getTermsMap() {
return termsMap;
}
public List getTypeList() {
return typeList;
}
public List getMatchedSubstringList() {
return matchedSubstringList;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("PlacePrediction{");
sb.append("description='").append(description).append('\'');
sb.append(", reference='").append(reference).append('\'');
sb.append(", id='").append(id).append('\'');
sb.append(", termsMap=").append(termsMap);
sb.append(", typeList=").append(typeList);
sb.append(", matchedSubstringList=").append(matchedSubstringList);
sb.append('}');
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy