org.jage.action.preparators
Class ActionPreparatorChain

java.lang.Object
  extended by org.jage.property.AbstractPropertyContainer
      extended by org.jage.property.ClassPropertyContainer
          extended by org.jage.strategy.AbstractStrategy
              extended by org.jage.action.preparators.ActionPreparatorChain
All Implemented Interfaces:
IActionPreparator, IChangesNotifier, IPropertyContainer, IStrategy

public class ActionPreparatorChain
extends AbstractStrategy
implements IActionPreparator

A IActionPreparator that expects a list of other IActionPreparators and build an aggregated complex action upon the actions they prepare. This class allows to chain IActionPreparators.

Author:
AGH AgE Team

Nested Class Summary
static class ActionPreparatorChain.Properties
          ActionPreparatorChain properties.
 
Field Summary
 
Fields inherited from class org.jage.property.AbstractPropertyContainer
argumentsResolver, changesNotifierMonitors, log, pathParser, properties
 
Constructor Summary
ActionPreparatorChain()
           
 
Method Summary
 Action prepareAction(IPropertiesSet state, IAgentEnvironment environment)
          Returns the action to be executed, given the state and environment of an agent.
 
Methods inherited from class org.jage.property.ClassPropertyContainer
addFunction, addPropertyMonitor, addPropertyMonitor, attachMonitorsToProperties, getMetaProperties, getProperties, getPropertiesFactory, getProperty, notifyMonitorsAboutDeletion, notifyMonitorsForChangedProperties, notifyMonitorsForChangedProperty, objectDeleted, removeFunction, removePropertyMonitor
 
Methods inherited from class org.jage.property.AbstractPropertyContainer
addMonitor, getFunctionArgumentsResolver, notifyChangeNotiferMonitors, removeMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jage.property.IPropertyContainer
addFunction, addPropertyMonitor, addPropertyMonitor, getMetaProperties, getProperties, getProperty, objectDeleted, removeFunction, removePropertyMonitor
 
Methods inherited from interface org.jage.monitor.IChangesNotifier
addMonitor, removeMonitor
 

Constructor Detail

ActionPreparatorChain

public ActionPreparatorChain()
Method Detail

prepareAction

public Action prepareAction(IPropertiesSet state,
                            IAgentEnvironment environment)
Description copied from interface: IActionPreparator
Returns the action to be executed, given the state and environment of an agent.

Specified by:
prepareAction in interface IActionPreparator
Parameters:
state - A set of properties, reflecting an agent's state.
environment - An agent's environment.
Returns:
The action to be executed.


Copyright © 2006-2011 AGH University of Science and Technology. All Rights Reserved.