public class WeakIdentityHashMap extends GenericMap implements Map
WeakIdentityHashMap is a hash map that hashes
objects based on System.identityHashMap, and holds weakly onto the
key. This fails if values make reference to the keys!size| Constructor and Description |
|---|
WeakIdentityHashMap()
the default and only constructor
|
WeakIdentityHashMap(int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key)
return the element with the given key
|
protected Iterator |
entryIterator() |
Object |
get(Object key)
return the element with the given key
|
boolean |
isEmpty() |
protected boolean |
keyEquals(Object key1,
Object key2) |
protected int |
keyHash(Object key) |
Object |
put(Object key,
Object value) |
Object |
remove(int hash,
Object key) |
Object |
remove(Object key) |
int |
size() |
protected void |
valueRemoved(Object value) |
containsValue, entrySet, equals, hashCode, keyIterator, keySet, putAll, valueEquals, valueHash, valueIterator, valuespublic WeakIdentityHashMap()
public WeakIdentityHashMap(int size)
public boolean containsKey(Object key)
containsKey in interface MapcontainsKey in class GenericMapprotected void valueRemoved(Object value)
protected Iterator entryIterator()
entryIterator in class GenericMapprotected final int keyHash(Object key)
keyHash in class GenericMapprotected final boolean keyEquals(Object key1, Object key2)
keyEquals in class GenericMappublic int size()
size in interface Mapsize in class GenericMappublic boolean isEmpty()
isEmpty in interface MapisEmpty in class GenericMapCopyright © 2001-2015 JRuby. All Rights Reserved.