org.aitools.programd.util
Class LRUCache.KeyIterator<K_,V_>

java.lang.Object
  extended by org.aitools.programd.util.LRUCache.KeyIterator<K_,V_>
Type Parameters:
K_ - the key
V_ - the value
All Implemented Interfaces:
java.util.Iterator<K_>
Enclosing class:
LRUCache<K,V>

static class LRUCache.KeyIterator<K_,V_>
extends java.lang.Object
implements java.util.Iterator<K_>

Iterator of cache keys


Field Summary
private  LRUCache<K_,V_> _cache
           
private  int _i
           
 
Constructor Summary
LRUCache.KeyIterator(LRUCache<K_,V_> cache)
           
 
Method Summary
 boolean hasNext()
           
(package private)  void init(LRUCache<K_,V_> cache)
           
 K_ next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_cache

private LRUCache<K_,V_> _cache

_i

private int _i
Constructor Detail

LRUCache.KeyIterator

LRUCache.KeyIterator(LRUCache<K_,V_> cache)
Method Detail

init

void init(LRUCache<K_,V_> cache)

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<K_>
Returns:
the next entry in the cache

next

public K_ next()
Specified by:
next in interface java.util.Iterator<K_>
Returns:
the next value

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<K_>
See Also:
Iterator.remove()