org.aspectj.org.eclipse.jdt.internal.core
Class LRUCacheEnumerator
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.LRUCacheEnumerator
- All Implemented Interfaces:
- java.util.Enumeration
public class LRUCacheEnumerator
- extends java.lang.Object
- implements java.util.Enumeration
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.
|
Method Summary |
boolean |
hasMoreElements()
Returns true if more elements exist. |
java.lang.Object |
nextElement()
Returns the next element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
elementQueue
protected LRUCacheEnumerator.LRUEnumeratorElement elementQueue
- Current element;
LRUCacheEnumerator
public LRUCacheEnumerator(LRUCacheEnumerator.LRUEnumeratorElement firstElement)
- Creates a CacheEnumerator on the list of
LRUEnumeratorElements.
hasMoreElements
public boolean hasMoreElements()
- Returns true if more elements exist.
- Specified by:
hasMoreElements in interface java.util.Enumeration
nextElement
public java.lang.Object nextElement()
- Returns the next element.
- Specified by:
nextElement in interface java.util.Enumeration