| java.lang.Object hu.netmind.persistence.WeakMap
WeakMap | public class WeakMap (Code) | | This is exactly like weak hashmap, but this implementation disregards
the object's equals() and hashCode() methods,
and uses object equality for testing. This means it will only return
an entry, if the object given as key exatcly matches the key in the map.
This is not so trivial, since the hashCode() need not to be
unique between objects, and we can't refer to the object directly
either, because then this wouldn't be a weak map.
Note: Ok, this is not an implementation of Map, if you wish
you can write the necessary methods.
author: Brautigam Robert version: Revision: $Revision$ |
Inner Class :public class Entry | |
Constructor Summary | |
public | WeakMap() |
get | public Object get(Object key)(Code) | | Get a value for the given key.
Parameters: key - The key object. The value for exatcly the given object instance. |
put | public void put(Object key, Object value, Object id)(Code) | | Put an object with a key to the map.
Parameters: key - The object which will be referred weakly, may not be null. Parameters: value - The value to the key. Parameters: id - Some identifier which does not refer to the key. |
|
|