protected static class MemoryTileCache.CacheLinkedListElement
extends java.lang.Object
MemoryTileCache.CacheEntry
elements. It supports element removal in constant time - in difference to
the Java implementation which needs O(n).Modifier and Type | Field and Description |
---|---|
protected int |
elementCount |
protected MemoryTileCache.CacheEntry |
firstElement |
protected MemoryTileCache.CacheEntry |
lastElement |
Constructor and Description |
---|
MemoryTileCache.CacheLinkedListElement() |
Modifier and Type | Method and Description |
---|---|
void |
addFirst(MemoryTileCache.CacheEntry element)
Add the element to the head of the list.
|
void |
clear() |
int |
getElementCount() |
MemoryTileCache.CacheEntry |
getFirstElement() |
MemoryTileCache.CacheEntry |
getLastElement() |
void |
moveElementToFirstPos(MemoryTileCache.CacheEntry entry) |
void |
removeEntry(MemoryTileCache.CacheEntry element)
Removes the specified element from the list.
|
protected MemoryTileCache.CacheEntry firstElement
protected MemoryTileCache.CacheEntry lastElement
protected int elementCount
public MemoryTileCache.CacheLinkedListElement()
public void clear()
public void addFirst(MemoryTileCache.CacheEntry element)
element
- new element to be addedpublic void removeEntry(MemoryTileCache.CacheEntry element)
element
- element to be removedpublic void moveElementToFirstPos(MemoryTileCache.CacheEntry entry)
public int getElementCount()
public MemoryTileCache.CacheEntry getLastElement()
public MemoryTileCache.CacheEntry getFirstElement()