|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.util.ManagedConcurrentValueMap
public class ManagedConcurrentValueMap extends java.lang.Object
This is a basic implementation of a map able to forget its values. This map uses internally a ConcurrentHashMap, thus should be save for concurrency. hashcode and equals are used to find the entries and should thus be implemented properly for the keys. This map does not support null keys.
- the key type
- the value typeConstructor Summary | |
ManagedConcurrentValueMap(ReferenceBundle bundle)
|
Method Summary | |
---|---|
java.lang.Object
|
get(java.lang.Object key)
Returns the value stored for the given key at the point of call. |
void
|
put(java.lang.Object key, java.lang.Object value)
Sets a new value for a given key. an older value is overwritten. |
void
|
setBundle(ReferenceBundle bundle)
Sets a new bundle used for reference creation. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor Detail |
---|
public ManagedConcurrentValueMap(ReferenceBundle bundle)
Method Detail |
---|
public java.lang.Object get(java.lang.Object key)
key
- a non null key
public void put(java.lang.Object key, java.lang.Object value)
key
- a non null keyvalue
- the new value
public void setBundle(ReferenceBundle bundle)
bundle
- - the ReferenceBundle
Groovy Documentation