jason.stdlib
Class wait

Package class diagram package wait
java.lang.Object
  extended by jason.asSemantics.DefaultInternalAction
      extended by jason.stdlib.wait
All Implemented Interfaces:
InternalAction, java.io.Serializable

public class wait
extends DefaultInternalAction

Internal action: .wait(E,T).

Description: suspend the intention for the time specified by T (in milliseconds) or until some event E happens. The events follow the AgentSpeak syntax but are enclosed by { and }, e.g. {+bel(33)}, {+!go(X,Y)}.

Parameters:

Examples:

See Also:
at, Serialized Form

Field Summary
static java.lang.String waitAtom
           
 
Constructor Summary
wait()
           
 
Method Summary
 boolean canBeUsedInContext()
          Return true if the internal action can be used in plans' context
 java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args)
          Executes the internal action.
 int getMaxArgs()
           
 int getMinArgs()
           
 boolean suspendIntention()
          Returns true if the internal action (IA) should suspend the intention where the IA is called
 
Methods inherited from class jason.asSemantics.DefaultInternalAction
checkArguments, prepareArguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

waitAtom

public static final java.lang.String waitAtom
See Also:
Constant Field Values
Constructor Detail

wait

public wait()
Method Detail

canBeUsedInContext

public boolean canBeUsedInContext()
Description copied from interface: InternalAction
Return true if the internal action can be used in plans' context

Specified by:
canBeUsedInContext in interface InternalAction
Overrides:
canBeUsedInContext in class DefaultInternalAction

suspendIntention

public boolean suspendIntention()
Description copied from interface: InternalAction
Returns true if the internal action (IA) should suspend the intention where the IA is called

Specified by:
suspendIntention in interface InternalAction
Overrides:
suspendIntention in class DefaultInternalAction

getMinArgs

public int getMinArgs()
Overrides:
getMinArgs in class DefaultInternalAction

getMaxArgs

public int getMaxArgs()
Overrides:
getMaxArgs in class DefaultInternalAction

execute

public java.lang.Object execute(TransitionSystem ts,
                                Unifier un,
                                Term[] args)
                         throws java.lang.Exception
Description copied from interface: InternalAction
Executes the internal action. It should return a Boolean or an Iterator. A true boolean return means that the IA was successfully executed. An Iterator result means that there is more than one answer for this IA (e.g. see member internal action).

Specified by:
execute in interface InternalAction
Overrides:
execute in class DefaultInternalAction
Throws:
java.lang.Exception