|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.epseelon.mobimap.tiles.TileCache
public class TileCache
This class implements a very basic cache that stores a given number of map tiles at most. We need a cache that is more intelligent and more efficient.
| Constructor Summary | |
|---|---|
TileCache(int size)
Builds a new empty cache with room ready for size tiles. |
|
| Method Summary | |
|---|---|
boolean |
containsKey(java.lang.String url)
|
Tile |
get(java.lang.String url)
Retrieves a tile behind a given URL |
void |
put(java.lang.String url,
Tile tile)
Stores a tile in the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TileCache(int size)
size tiles.
size - The maximum number of tiles this cache will contain at any time.| Method Detail |
|---|
public boolean containsKey(java.lang.String url)
url - the url to check for availability
public void put(java.lang.String url,
Tile tile)
url - The url of the tile to storetile - The tile to storepublic Tile get(java.lang.String url)
url - The URL of the tile to retrieve
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||