org.jppf.utils
Class SoftReferenceValuesMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by org.jppf.utils.SoftReferenceValuesMap<K,V>
Type Parameters:
K - the type of the keys.
V - the type of the values.
All Implemented Interfaces:
Map<K,V>

public class SoftReferenceValuesMap<K,V>
extends AbstractMap<K,V>

Map whose values are soft references. When a value has been garbage-collected, the corresponding map entry is removed.

Author:
Laurent Cohen

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
SoftReferenceValuesMap()
          Default constructor.
 
Method Summary
 Set<Map.Entry<K,V>> entrySet()
          
 V get(Object key)
          
 boolean isEmpty()
          
 V put(K key, V value)
          
 V remove(Object key)
          
 int size()
          
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, hashCode, keySet, putAll, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SoftReferenceValuesMap

public SoftReferenceValuesMap()
Default constructor.

Method Detail

size

public int size()

Specified by:
size in interface Map<K,V>
Overrides:
size in class AbstractMap<K,V>

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface Map<K,V>
Overrides:
isEmpty in class AbstractMap<K,V>

get

public V get(Object key)

Specified by:
get in interface Map<K,V>
Overrides:
get in class AbstractMap<K,V>

put

public V put(K key,
             V value)

Specified by:
put in interface Map<K,V>
Overrides:
put in class AbstractMap<K,V>

remove

public V remove(Object key)

Specified by:
remove in interface Map<K,V>
Overrides:
remove in class AbstractMap<K,V>

entrySet

public Set<Map.Entry<K,V>> entrySet()

Specified by:
entrySet in interface Map<K,V>
Specified by:
entrySet in class AbstractMap<K,V>


Copyright © 2005-2010 JPPF Team.