public class Prediction extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Prediction.DescriptionTerm
Represents an element within a description.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Prediction() |
| Modifier and Type | Method and Description |
|---|---|
protected Prediction |
addTerms(Collection<Prediction.DescriptionTerm> terms) |
protected Prediction |
addTypes(Collection<String> types)
Adds a collection of string "types".
|
GooglePlaces |
getClient()
Returns the client for this prediction.
|
String |
getDescription()
Returns a description of the prediction in human-readable form.
|
Place |
getPlace(Param... extraParams)
Returns the place this prediction is suggesting.
|
String |
getPlaceId()
Returns the id of the place this prediction is suggesting.
|
int |
getSubstringLength()
Returns the length from the substring offset of the matched string.
|
int |
getSubstringOffset()
Returns the offset from the query where the matched string starts.
|
List<Prediction.DescriptionTerm> |
getTerms()
Returns the components of the description.
|
List<String> |
getTypes()
Returns all of this place's types in an unmodifiable list.
|
static List<Prediction> |
parse(GooglePlaces client,
String rawJson)
Returns a list of predictions from JSON.
|
protected Prediction |
setClient(GooglePlaces client) |
protected Prediction |
setDescription(String description) |
protected Prediction |
setPlaceId(String placeId) |
protected Prediction |
setSubstringLength(int substrLength) |
protected Prediction |
setSubstringOffset(int substrOffset) |
String |
toString() |
public static List<Prediction> parse(GooglePlaces client, String rawJson)
client - of requestrawJson - to parsepublic GooglePlaces getClient()
protected Prediction setClient(GooglePlaces client)
public Place getPlace(Param... extraParams)
extraParams - to append to request URLprotected Prediction addTypes(Collection<String> types)
types - to addpublic List<String> getTypes()
protected Prediction addTerms(Collection<Prediction.DescriptionTerm> terms)
public List<Prediction.DescriptionTerm> getTerms()
public String getPlaceId()
protected Prediction setPlaceId(String placeId)
public String getDescription()
protected Prediction setDescription(String description)
public int getSubstringOffset()
protected Prediction setSubstringOffset(int substrOffset)
public int getSubstringLength()
protected Prediction setSubstringLength(int substrLength)
Copyright © 2014–2015. All rights reserved.