net.sourceforge.rcache
Interface KeyedReference<K,V>

Type Parameters:
K - the type of keys maintained by this cache
V - the type of cached values
All Known Implementing Classes:
SoftKeyedReference, WeakKeyedReference

public interface KeyedReference<K,V>

Reference with an attached key to be used in a cache.

Although it cannot be enforced/checked at compilation time, the contract for this interface is that all implementors MUST be subclasses of Reference.

Author:
Rodrigo Ruiz

Method Summary
 V get()
          Gets the referenced value.
 K getKey()
          Gets the key for this reference.
 

Method Detail

getKey

K getKey()
Gets the key for this reference.

Returns:
The key

get

V get()
Gets the referenced value.

Returns:
The value


© 2007-2009 Rodrigo Ruiz
This site is hosted by