All Downloads are FREE. Search and download functionalities are using the official Maven repository.

astra.tr.CompositeAction Maven / Gradle / Ivy

package astra.tr;

import java.util.Map;

import astra.term.Term;

public class CompositeAction extends AbstractAction {
	Action[] actions;
	
	public CompositeAction(Action...actions) {
		this.actions = actions;
	}
	
	@Override
	public ActionHandler getStatementHandler() {
		return new ActionHandler() {

			@Override
			public boolean execute(TRContext context, Map bindings) {
				for (Action action : actions) {
					if (!action.getStatementHandler().execute(context, bindings)) return false;
				}
				return true;
			}
		};
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy