public class TileBasedLabelStore extends org.mapsforge.core.util.WorkingSetCache<org.mapsforge.core.model.Tile,java.util.List<org.mapsforge.core.mapelements.MapElementContainer>> implements LabelStore
| Constructor and Description |
|---|
TileBasedLabelStore(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
int |
getVersion()
Returns a version number, which changes every time an update is made to the LabelStore.
|
java.util.List<org.mapsforge.core.mapelements.MapElementContainer> |
getVisibleItems(org.mapsforge.core.model.Tile upperLeft,
org.mapsforge.core.model.Tile lowerRight)
Gets the items that are visible on a set of tiles.
|
protected boolean |
removeEldestEntry(java.util.Map.Entry<org.mapsforge.core.model.Tile,java.util.List<org.mapsforge.core.mapelements.MapElementContainer>> eldest) |
boolean |
requiresTile(org.mapsforge.core.model.Tile tile)
Returns if a tile is in the current tile set and no data is stored for this tile.
|
void |
storeMapItems(org.mapsforge.core.model.Tile tile,
java.util.List<org.mapsforge.core.mapelements.MapElementContainer> mapItems)
Stores a list of MapElements against a tile.
|
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizefinalize, getClass, notify, notifyAll, wait, wait, waitclearpublic void destroy()
public void storeMapItems(org.mapsforge.core.model.Tile tile,
java.util.List<org.mapsforge.core.mapelements.MapElementContainer> mapItems)
tile - tile on which the mapItems reside.mapItems - the map elements.public int getVersion()
LabelStoregetVersion in interface LabelStorepublic java.util.List<org.mapsforge.core.mapelements.MapElementContainer> getVisibleItems(org.mapsforge.core.model.Tile upperLeft,
org.mapsforge.core.model.Tile lowerRight)
LabelStoregetVisibleItems in interface LabelStoreupperLeft - tile in upper left corner of visible area.lowerRight - tile in lower right corner of visible area.public boolean requiresTile(org.mapsforge.core.model.Tile tile)
tile - the tileprotected boolean removeEldestEntry(java.util.Map.Entry<org.mapsforge.core.model.Tile,java.util.List<org.mapsforge.core.mapelements.MapElementContainer>> eldest)
removeEldestEntry in class org.mapsforge.core.util.LRUCache<org.mapsforge.core.model.Tile,java.util.List<org.mapsforge.core.mapelements.MapElementContainer>>