|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.maps.client.geocode.GeocodeCache
com.google.gwt.maps.client.geocode.CustomGeocodeCache
public class CustomGeocodeCache
Provides a way to customize the caching behavior of geocoded queries. This class is both functional and a base class so the user can extend it.
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.maps.client.geocode.GeocodeCache |
|---|
jsoPeer |
| Constructor Summary | |
|---|---|
CustomGeocodeCache()
|
|
| Method Summary | |
|---|---|
com.google.gwt.core.client.JavaScriptObject |
get(java.lang.String address)
Returns the reply which was stored under the given address. |
boolean |
isCacheable(com.google.gwt.core.client.JavaScriptObject reply)
Returns whether or not the given reply should be cached. |
void |
put(java.lang.String address,
com.google.gwt.core.client.JavaScriptObject reply)
Stores the given reply under the given address. |
void |
reset()
Purges all replies from the cache. |
java.lang.String |
toCanonical(java.lang.String address)
Returns what is considered a canonical version of the address. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CustomGeocodeCache()
| Method Detail |
|---|
public com.google.gwt.core.client.JavaScriptObject get(java.lang.String address)
GeocodeCachenull
get in class GeocodeCacheaddress - the address used as a key to lookup.
public boolean isCacheable(com.google.gwt.core.client.JavaScriptObject reply)
GeocodeCachenull and that it has
the name field . This method may be overridden by extending classes to
provide more precise conditions on the reply object.
isCacheable in class GeocodeCachereply - the reply to test.
public void put(java.lang.String address,
com.google.gwt.core.client.JavaScriptObject reply)
GeocodeCacheGeocodeCache.isCacheable(com.google.gwt.core.client.JavaScriptObject) method to verify that the reply may be cached. If it
gets a go-ahead, it caches the reply under the address normalized with the
help of the GeocodeCache.toCanonical(java.lang.String) method.
put in class GeocodeCacheaddress - the address used in the query.reply - the reply value to cache.public void reset()
GeocodeCache
reset in class GeocodeCachepublic java.lang.String toCanonical(java.lang.String address)
GeocodeCache
toCanonical in class GeocodeCacheaddress - the address to convert to canonical form.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||