org.aspectj.org.eclipse.jdt.internal.core
Class LRUCacheEnumerator

java.lang.Object
  extended by 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.


Nested Class Summary
static class LRUCacheEnumerator.LRUEnumeratorElement
           
 
Field Summary
protected  LRUCacheEnumerator.LRUEnumeratorElement elementQueue
          Current element;
 
Constructor Summary
LRUCacheEnumerator(LRUCacheEnumerator.LRUEnumeratorElement firstElement)
          Creates a CacheEnumerator on the list of LRUEnumeratorElements.
 
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
 

Field Detail

elementQueue

protected LRUCacheEnumerator.LRUEnumeratorElement elementQueue
Current element;

Constructor Detail

LRUCacheEnumerator

public LRUCacheEnumerator(LRUCacheEnumerator.LRUEnumeratorElement firstElement)
Creates a CacheEnumerator on the list of LRUEnumeratorElements.

Method Detail

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