jadex.bdi.planlib.iasteps.StepChain Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applib-bdi Show documentation
Show all versions of jadex-applib-bdi Show documentation
The Jadex applib BDI package contain
ready to use functionalities for
BDI agents mostly in form of modules
called capabilities.
package jadex.bdi.planlib.iasteps;
import java.util.Collection;
import jadex.bridge.IComponentStep;
import jadex.bridge.IInternalAccess;
public class StepChain implements IComponentStep
{
protected IComponentStep[] steps;
public StepChain(IComponentStep[] steps)
{
this.steps = steps;
}
public StepChain(Collection steps)
{
this.steps = (IComponentStep[]) steps.toArray(new IComponentStep[steps.size()]);
}
public Object execute(IInternalAccess ia)
{
Object[] results = new Object[steps.length];
for (int i = 0; i < steps.length; ++i)
results[i] = steps[i].execute(ia);
return results;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy