Class IterableCallBackAction

java.lang.Object
repast.simphony.engine.schedule.IterableCallBackAction
All Implemented Interfaces:
IAction

public class IterableCallBackAction extends Object implements IAction
An IAction created from an Iterable, a method name and method parameters. When an IterableCallBackAction is executed it will call the named method on each object returned by an Iterable, passing the parameters.
Version:
$Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
Author:
Nick Collier
  • Constructor Details

    • IterableCallBackAction

      public IterableCallBackAction(Iterable target, String methodName, boolean shuffle, Object... parameters)
      Creates an IterableCallBackAction from the specified Iterable, method name, and method parameters. When executed, the sction will call the named method on each element returned from the target passing the specified parameters.
      Parameters:
      target - the object to call the method on
      methodName - the name of the method to call
      parameters - the parameters to pass to the method
      Throws:
      IllegalArgumentException - if the target does not contain a method with the appropriate signature.
  • Method Details

    • execute

      public void execute()
      Calls the method named in the constructor on the targets in the iterable named in the constructor.
      Specified by:
      execute in interface IAction