|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.util.ManagedConcurrentValueMap<K,V>
K
- the key typeV
- the value typepublic class ManagedConcurrentValueMap<K,V>
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.
Constructor Summary | |
---|---|
ManagedConcurrentValueMap(ReferenceBundle bundle)
|
Method Summary | |
---|---|
V |
get(K key)
Returns the value stored for the given key at the point of call. |
void |
put(K key,
V 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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManagedConcurrentValueMap(ReferenceBundle bundle)
Method Detail |
---|
public void setBundle(ReferenceBundle bundle)
bundle
- - the ReferenceBundlepublic V get(K key)
key
- a non null key
public void put(K key, V value)
key
- a non null keyvalue
- the new value
|
Copyright © 2003-2012 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |