|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.core.behaviours.Behaviour
jade.core.behaviours.CompositeBehaviour
jade.core.behaviours.SerialBehaviour
jade.core.behaviours.SequentialBehaviour
public class SequentialBehaviour
Composite behaviour with sequential children scheduling. It is a
CompositeBehaviour that executes its children behaviours
in sequential order, and terminates when its last child has ended.
| Field Summary |
|---|
| Fields inherited from class jade.core.behaviours.Behaviour |
|---|
myAgent |
| Constructor Summary | |
|---|---|
SequentialBehaviour()
Default constructor. |
|
SequentialBehaviour(Agent a)
This constructor sets the owner agent for this behaviour. |
|
| Method Summary | |
|---|---|
void |
addSubBehaviour(Behaviour b)
Add a sub behaviour to this SequentialBehaviour |
protected boolean |
checkTermination(boolean currentDone,
int currentResult)
Check whether this SequentialBehaviour must terminate. |
Collection |
getChildren()
Return a Collection view of the children of this SequentialBehaviour |
protected Behaviour |
getCurrent()
Get the current child |
void |
removeSubBehaviour(Behaviour b)
Remove a sub behaviour from this SequentialBehaviour |
protected void |
scheduleFirst()
Prepare the first child for execution |
protected void |
scheduleNext(boolean currentDone,
int currentResult)
Sequential policy for children scheduling. |
| Methods inherited from class jade.core.behaviours.CompositeBehaviour |
|---|
action, done, reset, resetChildren, setAgent |
| Methods inherited from class jade.core.behaviours.Behaviour |
|---|
block, block, getBehaviourName, getDataStore, getParent, isRunnable, onEnd, onStart, restart, root, setBehaviourName, setDataStore |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SequentialBehaviour()
public SequentialBehaviour(Agent a)
a - The agent this behaviour belongs to.| Method Detail |
|---|
protected void scheduleFirst()
scheduleFirst in class CompositeBehaviourCompositeBehaviour.scheduleFirst()
protected void scheduleNext(boolean currentDone,
int currentResult)
scheduleNext in class CompositeBehaviourcurrentDone - a flag indicating whether the just executed
child has completed or not.currentResult - the termination value (as returned by
onEnd()) of the just executed child in the case this
child has completed (otherwise this parameter is meaningless)CompositeBehaviour.scheduleNext(boolean, int)
protected boolean checkTermination(boolean currentDone,
int currentResult)
SequentialBehaviour must terminate.
checkTermination in class CompositeBehaviourcurrentDone - a flag indicating whether the just executed
child has completed or not.currentResult - the termination value (as returned by
onEnd()) of the just executed child in the case this
child has completed (otherwise this parameter is meaningless)
CompositeBehaviour.checkTermination(boolean, int)protected Behaviour getCurrent()
getCurrent in class CompositeBehaviourCompositeBehaviour.getCurrent()public Collection getChildren()
SequentialBehaviour
getChildren in class CompositeBehaviourCompositeBehaviour.getChildren()public void addSubBehaviour(Behaviour b)
SequentialBehaviour
public void removeSubBehaviour(Behaviour b)
SequentialBehaviour
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||