public final class GeoQuery
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
accuracy |
private java.lang.String |
granularity |
private java.lang.String |
ip |
private GeoLocation |
location |
private int |
maxResults |
private java.lang.String |
query |
private static long |
serialVersionUID |
Constructor and Description |
---|
GeoQuery(GeoLocation location)
Creates a GeoQuery with the specified location
|
GeoQuery(java.lang.String ip)
Creates a GeoQuery with the specified IP address
|
GeoQuery(java.lang.String query,
java.lang.String ip,
GeoLocation location)
Creates a GeoQuery with the specified query, ip and location
|
Modifier and Type | Method and Description |
---|---|
GeoQuery |
accuracy(java.lang.String accuracy) |
private void |
appendParameter(java.lang.String name,
double value,
java.util.List<HttpParameter> params) |
private void |
appendParameter(java.lang.String name,
int value,
java.util.List<HttpParameter> params) |
private void |
appendParameter(java.lang.String name,
java.lang.String value,
java.util.List<HttpParameter> params) |
(package private) HttpParameter[] |
asHttpParameterArray() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAccuracy() |
java.lang.String |
getGranularity() |
java.lang.String |
getIp() |
GeoLocation |
getLocation() |
int |
getMaxResults() |
java.lang.String |
getQuery()
Gets the query to filter Place results from geo/search
|
GeoQuery |
granularity(java.lang.String granularity) |
int |
hashCode() |
GeoQuery |
maxResults(int maxResults) |
void |
setAccuracy(java.lang.String accuracy)
Sets a hint on the "region" in which to search.
|
void |
setGranularity(java.lang.String granularity)
Sets the minimal granularity of data to return.
|
void |
setMaxResults(int maxResults)
Sets a hint as to the number of results to return.
|
void |
setQuery(java.lang.String query) |
java.lang.String |
toString() |
private static final long serialVersionUID
private GeoLocation location
private java.lang.String query
private java.lang.String ip
private java.lang.String accuracy
private java.lang.String granularity
private int maxResults
public GeoQuery(GeoLocation location)
location
- geo locationpublic GeoQuery(java.lang.String ip)
ip
- IP addresspublic GeoQuery(java.lang.String query, java.lang.String ip, GeoLocation location)
query
- free-form text to matchip
- IP addresslocation
- geo locationpublic GeoLocation getLocation()
public java.lang.String getQuery()
public void setQuery(java.lang.String query)
public java.lang.String getIp()
public java.lang.String getAccuracy()
public void setAccuracy(java.lang.String accuracy)
accuracy
- a hint on the "region" in which to search.public GeoQuery accuracy(java.lang.String accuracy)
public java.lang.String getGranularity()
public void setGranularity(java.lang.String granularity)
granularity
- the minimal granularity of data to returnpublic GeoQuery granularity(java.lang.String granularity)
public int getMaxResults()
public void setMaxResults(int maxResults)
maxResults
- A hint as to the number of results to return.public GeoQuery maxResults(int maxResults)
HttpParameter[] asHttpParameterArray()
private void appendParameter(java.lang.String name, java.lang.String value, java.util.List<HttpParameter> params)
private void appendParameter(java.lang.String name, int value, java.util.List<HttpParameter> params)
private void appendParameter(java.lang.String name, double value, java.util.List<HttpParameter> params)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object