Class LRUCacheEnumerator<V>
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.LRUCacheEnumerator<V>
- All Implemented Interfaces:
Enumeration<V>
The
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.-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected LRUCacheEnumerator.LRUEnumeratorElement<V>
Current element; -
Constructor Summary
ConstructorDescriptionLRUCacheEnumerator(LRUCacheEnumerator.LRUEnumeratorElement<V> firstElement)
Creates a CacheEnumerator on the list ofLRUEnumeratorElements
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if more elements exist.Returns the next element.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
-
Field Details
-
elementQueue
Current element;
-
-
Constructor Details
-
LRUCacheEnumerator
Creates a CacheEnumerator on the list ofLRUEnumeratorElements
.
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()Returns true if more elements exist.- Specified by:
hasMoreElements
in interfaceEnumeration<V>
-
nextElement
Returns the next element.- Specified by:
nextElement
in interfaceEnumeration<V>
-