com.croftsoft.core.util
Class SoftHashMap

java.lang.Object
  extended by java.util.AbstractMap
      extended by com.croftsoft.core.util.SoftHashMap
All Implemented Interfaces:
Map

public class SoftHashMap
extends AbstractMap

A Map implementation that dumps its content when memory runs low.

Backed by a WeakHashMap. Note that an entry will not be garbage collected if its key remains strongly reachable.

Version:
1999-04-20
See Also:
WeakHashMap, SoftReference
Author:
David Wallace Croft

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
SoftHashMap()
           
 
Method Summary
 void clearQueue()
           
 Set entrySet()
           
static void main(String[] args)
           
 Object put(Object key, Object value)
           
static boolean test()
           
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SoftHashMap

public SoftHashMap()
Method Detail

main

public static void main(String[] args)

test

public static boolean test()

entrySet

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

put

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

clearQueue

public void clearQueue()

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)