org.openstreetmap.gui.jmapviewer
Class MemoryTileCache.CacheLinkedListElement
java.lang.Object
org.openstreetmap.gui.jmapviewer.MemoryTileCache.CacheLinkedListElement
- Enclosing class:
- MemoryTileCache
protected static class MemoryTileCache.CacheLinkedListElement
- extends java.lang.Object
Special implementation of a double linked list for MemoryTileCache.CacheEntry
elements. It supports element removal in constant time - in difference to
the Java implementation which needs O(n).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
firstElement
protected MemoryTileCache.CacheEntry firstElement
lastElement
protected MemoryTileCache.CacheEntry lastElement
elementCount
protected int elementCount
MemoryTileCache.CacheLinkedListElement
public MemoryTileCache.CacheLinkedListElement()
clear
public void clear()
addFirst
public void addFirst(MemoryTileCache.CacheEntry element)
- Add the element to the head of the list.
- Parameters:
element
- new element to be added
removeEntry
public void removeEntry(MemoryTileCache.CacheEntry element)
- Removes the specified element from the list.
- Parameters:
element
- element to be removed
moveElementToFirstPos
public void moveElementToFirstPos(MemoryTileCache.CacheEntry entry)
getElementCount
public int getElementCount()
getLastElement
public MemoryTileCache.CacheEntry getLastElement()
getFirstElement
public MemoryTileCache.CacheEntry getFirstElement()
JOSM