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

jason.stdlib.queue.add Maven / Gradle / Ivy

The newest version!
package jason.stdlib.queue;

import jason.asSemantics.InternalAction;
import jason.asSemantics.TransitionSystem;
import jason.asSemantics.Unifier;
import jason.asSyntax.Term;


public class add extends create {

    private static InternalAction singleton = null;
    public static InternalAction create() {
        if (singleton == null)
            singleton = new add();
        return singleton;
    }

    @Override
    public Object execute(TransitionSystem ts, Unifier un, Term[] args) throws Exception {
        return getQueue(un, args).offer(args[1]);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy