|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.sesat.search.datamodel.generic.MapDataObjectSupport<V>
@DataObject public final class MapDataObjectSupport<V>
This helper class provides a utility implementation of the no.sesat.search.datamodel.MapDataObject interface.
Since this class directly implements the MapDataObject interface, the class can, and is intended to be used either by subclassing this implementation, or via ad-hoc delegation of an instance of this class from another.
Synchronised implementation of MapDataObject through underlyng usage of ConcurrentHashMap. //Uses a ReentrantReadWriteLock in a delegated HashMap in preference to a Hashtable to maximise performance. //Access to the whole map is through a Collections.unmodifiable(map) defensive copy.
| Constructor Summary | |
|---|---|
MapDataObjectSupport(Map<String,V> map)
|
|
| Method Summary | |
|---|---|
V |
getValue(String key)
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. |
Map<String,V> |
getValues()
Access to whole map is through a Collections.unmodifiable(map) copy. |
void |
setValue(String key,
V value)
Associates the specified value with the specified key in this map (optional operation). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapDataObjectSupport(Map<String,V> map)
| Method Detail |
|---|
public V getValue(String key)
MapDataObject
getValue in interface MapDataObject<V>
public void setValue(String key,
V value)
MapDataObject
setValue in interface MapDataObject<V>public Map<String,V> getValues()
MapDataObject
getValues in interface MapDataObject<V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||