public class DefaultInternalAction extends java.lang.Object implements InternalAction, java.io.Serializable
Constructor and Description |
---|
DefaultInternalAction() |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeUsedInContext()
Return true if the internal action can be used in plans' context
|
protected void |
checkArguments(Term[] args) |
void |
destroy() |
java.lang.Object |
execute(TransitionSystem ts,
Unifier un,
Term[] args)
Executes the internal action.
|
int |
getMaxArgs() |
int |
getMinArgs() |
Term[] |
prepareArguments(Literal body,
Unifier un)
Prepare body's terms to be used in 'execute', normally it consist of cloning and applying each term
|
boolean |
suspendIntention()
Returns true if the internal action (IA) should suspend the
intention where the IA is called
|
public boolean suspendIntention()
InternalAction
suspendIntention
in interface InternalAction
public boolean canBeUsedInContext()
InternalAction
canBeUsedInContext
in interface InternalAction
public int getMinArgs()
public int getMaxArgs()
protected void checkArguments(Term[] args) throws JasonException
JasonException
public Term[] prepareArguments(Literal body, Unifier un)
InternalAction
prepareArguments
in interface InternalAction
public java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args) throws java.lang.Exception
InternalAction
execute
in interface InternalAction
java.lang.Exception
public void destroy() throws java.lang.Exception
destroy
in interface InternalAction
java.lang.Exception