public class LRUCacheEnumerator<V>
extends java.lang.Object
implements java.util.Enumeration<V>
LRUCacheEnumerator returns its elements in
the order they are found in the LRUCache, with the
most recent elements first.
Once the enumerator is created, elements which are later added
to the cache are not returned by the enumerator. However,
elements returned from the enumerator could have been closed
by the cache.| Modifier and Type | Class and Description |
|---|---|
static class |
LRUCacheEnumerator.LRUEnumeratorElement<V> |
| Modifier and Type | Field and Description |
|---|---|
protected LRUCacheEnumerator.LRUEnumeratorElement<V> |
elementQueue
Current element;
|
| Constructor and Description |
|---|
LRUCacheEnumerator(LRUCacheEnumerator.LRUEnumeratorElement<V> firstElement)
Creates a CacheEnumerator on the list of
LRUEnumeratorElements. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasMoreElements()
Returns true if more elements exist.
|
V |
nextElement()
Returns the next element.
|
protected LRUCacheEnumerator.LRUEnumeratorElement<V> elementQueue
public LRUCacheEnumerator(LRUCacheEnumerator.LRUEnumeratorElement<V> firstElement)
LRUEnumeratorElements.