com.almende.eve.state
Class MemoryState

java.lang.Object
  extended by com.almende.eve.state.AbstractState
      extended by com.almende.eve.state.MemoryState
All Implemented Interfaces:
State, Map<String,Object>

public class MemoryState
extends AbstractState

Author:
jos

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class com.almende.eve.state.AbstractState
agentId
 
Fields inherited from interface com.almende.eve.state.State
KEY_AGENT_TYPE
 
Constructor Summary
MemoryState()
           
MemoryState(String agentId)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 void destroy()
          destroy is executed once after the agent method is invoked
 Set<Map.Entry<String,Object>> entrySet()
           
 Object get(Object key)
           
 void init()
          init is executed once before the agent method is invoked
 boolean isEmpty()
           
 Set<String> keySet()
           
 Object put(String key, Object value)
           
 void putAll(Map<? extends String,? extends Object> map)
           
 boolean putIfUnchanged(String key, Object newVal, Object oldVal)
           
 Object remove(Object key)
           
 int size()
           
 Collection<Object> values()
           
 
Methods inherited from class com.almende.eve.state.AbstractState
getAgentId, getAgentType, setAgentType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

MemoryState

public MemoryState()

MemoryState

public MemoryState(String agentId)
Method Detail

clear

public void clear()

keySet

public Set<String> keySet()

containsKey

public boolean containsKey(Object key)

containsValue

public boolean containsValue(Object value)

entrySet

public Set<Map.Entry<String,Object>> entrySet()

get

public Object get(Object key)

isEmpty

public boolean isEmpty()

put

public Object put(String key,
                  Object value)

putAll

public void putAll(Map<? extends String,? extends Object> map)

putIfUnchanged

public boolean putIfUnchanged(String key,
                              Object newVal,
                              Object oldVal)

remove

public Object remove(Object key)

size

public int size()

values

public Collection<Object> values()

init

public void init()
init is executed once before the agent method is invoked

Specified by:
init in interface State
Specified by:
init in class AbstractState

destroy

public void destroy()
destroy is executed once after the agent method is invoked

Specified by:
destroy in interface State
Specified by:
destroy in class AbstractState


Copyright © 2013 Almende BV. All Rights Reserved.