org.planx.util
Class SoftValueMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by org.planx.util.SoftValueMap<K,V>
All Implemented Interfaces:
Map<K,V>

public class SoftValueMap<K,V>
extends AbstractMap<K,V>
implements Map<K,V>

A map implementation with soft values.

Author:
Thomas Ambus

Constructor Summary
SoftValueMap()
           
SoftValueMap(int initialCapacity)
           
SoftValueMap(int initialCapacity, float loadFactor)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 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
containsValue, equals, hashCode, keySet, putAll, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsValue, equals, hashCode, keySet, putAll, values
 

Constructor Detail

SoftValueMap

public SoftValueMap()

SoftValueMap

public SoftValueMap(int initialCapacity)

SoftValueMap

public SoftValueMap(int initialCapacity,
                    float loadFactor)
Method Detail

entrySet

public Set<Map.Entry<K,V>> entrySet()
Specified by:
entrySet in interface Map<K,V>
Specified by:
entrySet in class AbstractMap<K,V>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<K,V>
Overrides:
containsKey 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>

clear

public void clear()
Specified by:
clear in interface Map<K,V>
Overrides:
clear in class AbstractMap<K,V>

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>


Copyright © 2004-2005 Plan-X. All Rights Reserved.