JXTA

net.jxta.impl.util
Class Cache.CacheEntryImpl

java.lang.Object
  extended by net.jxta.impl.util.Dlink
      extended by net.jxta.impl.util.Cache.CacheEntryImpl
All Implemented Interfaces:
CacheEntry
Enclosing class:
Cache

 class Cache.CacheEntryImpl
extends Dlink
implements CacheEntry

CacheEntryImpl objects are both part of a doubly linked list and inserted in a HashMap. They refer to the thing mapped which is what users of this class want to get, and to the key. The reason is that we need the key to remove from the map an entry that we found in list. The otherway around is made easy by the nature of the dlinked structure.


Constructor Summary
Cache.CacheEntryImpl(Object k, Object v)
           
 
Method Summary
 Object getKey()
          
 Object getValue()
          
 
Methods inherited from class net.jxta.impl.util.Dlink
isLinked, linkNewNext, linkNewPrev, next, prev, unlink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cache.CacheEntryImpl

public Cache.CacheEntryImpl(Object k,
                            Object v)
Method Detail

getKey

public Object getKey()

Specified by:
getKey in interface CacheEntry

getValue

public Object getValue()

Specified by:
getValue in interface CacheEntry

JXSE