public class WeakIdentityMap extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
WeakIdentityMap.Key |
Modifier and Type | Field and Description |
---|---|
private Map |
map |
private ReferenceQueue |
queue |
Constructor and Description |
---|
WeakIdentityMap() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all associations from this map.
|
Object |
get(Object key)
Returns value associated with given key, or null if none.
|
private void |
processQueue() |
Object |
put(Object key,
Object value)
Associates value with given key, returning value previously associated
with key, or null if none.
|
Object |
remove(Object key)
Removes association for given key, returning value previously associated
with key, or null if none.
|
Collection |
values()
Returns collection containing all values currently held in this map.
|
private final Map map
private final ReferenceQueue queue
public Object put(Object key, Object value)
public Object remove(Object key)
public Collection values()
public void clear()
private void processQueue()
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.