modhelxs.state_management
Class MapAttribute<K,V>

java.lang.Object
  extended by modhelxs.state_management.MapAttribute<K,V>
All Implemented Interfaces:
StateValue
Direct Known Subclasses:
TransientMap

public class MapAttribute<K,V>
extends java.lang.Object
implements StateValue

A state value which stores data in a Map.


Field Summary
private  java.util.Map<K,V> trans_value_
           
private  java.util.Map<K,V> value_
           
 
Constructor Summary
MapAttribute()
           
MapAttribute(java.util.Map<K,V> initmap)
           
 
Method Summary
 void commit()
           
 V get(K key)
          Get the value associated to a key.
 java.util.Set<K> keySet()
          Return the set of keys of this map.
 V put(K key, V value)
          Set the transient value associated to a key.
 void revert()
           
 java.util.Collection<V> values()
          Return a collection of the values in this map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value_

private java.util.Map<K,V> value_

trans_value_

private java.util.Map<K,V> trans_value_
Constructor Detail

MapAttribute

public MapAttribute()

MapAttribute

public MapAttribute(java.util.Map<K,V> initmap)
Method Detail

revert

public void revert()
Specified by:
revert in interface StateValue

commit

public void commit()
Specified by:
commit in interface StateValue

get

public V get(K key)
Get the value associated to a key.


put

public V put(K key,
             V value)
Set the transient value associated to a key.


keySet

public java.util.Set<K> keySet()
Return the set of keys of this map.


values

public java.util.Collection<V> values()
Return a collection of the values in this map.