net.ontopia.utils
Class SoftHashMap

java.lang.Object
  extended by java.util.AbstractMap
      extended by net.ontopia.utils.SoftHashMap
All Implemented Interfaces:
Map

public class SoftHashMap
extends AbstractMap

INTERNAL: A Map implementation that uses SoftReferences to reference keys.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
protected  Map hash
           
protected  ReferenceQueue queue
           
 
Constructor Summary
SoftHashMap()
           
SoftHashMap(int initialCapacity)
           
SoftHashMap(int initialCapacity, float loadFactor)
           
SoftHashMap(Map t)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 Set entrySet()
           
 Object get(Object key)
           
 boolean isEmpty()
           
protected  void processQueue()
           
 Object put(Object key, Object value)
           
 Object remove(Object key)
           
 int size()
           
 
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, keySet, putAll, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

hash

protected Map hash

queue

protected ReferenceQueue queue
Constructor Detail

SoftHashMap

public SoftHashMap(int initialCapacity,
                   float loadFactor)

SoftHashMap

public SoftHashMap(int initialCapacity)

SoftHashMap

public SoftHashMap()

SoftHashMap

public SoftHashMap(Map t)
Method Detail

processQueue

protected void processQueue()

size

public int size()
Specified by:
size in interface Map
Overrides:
size in class AbstractMap

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map
Overrides:
isEmpty in class AbstractMap

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map
Overrides:
containsKey in class AbstractMap

get

public Object get(Object key)
Specified by:
get in interface Map
Overrides:
get in class AbstractMap

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map
Overrides:
put in class AbstractMap

remove

public Object remove(Object key)
Specified by:
remove in interface Map
Overrides:
remove in class AbstractMap

clear

public void clear()
Specified by:
clear in interface Map
Overrides:
clear in class AbstractMap

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map
Specified by:
entrySet in class AbstractMap


Copyright © 2000-2012 Ontopia.