public class CyclicBehavior extends Behavior
Behavior.action()
method of this behavior
is repeatedly called.Constructor and Description |
---|
CyclicBehavior()
Creates a behavior that is executed cyclically.
|
CyclicBehavior(java.lang.Runnable runnable)
Creates a behavior that is executed cyclically.
|
Modifier and Type | Method and Description |
---|---|
boolean |
done()
This method returns false until stop() is called.
|
int |
getPriority()
This method should return a number that denotes the priority of a behavior.
|
void |
stop()
Terminates the behavior.
|
action, agent, agentForService, agentForService, agentsForService, agentsForService, block, block, compareTo, isBlocked, onEnd, onStart, println, reset, restart
public CyclicBehavior()
public CyclicBehavior(java.lang.Runnable runnable)
runnable
- Runnable to run.public final boolean done()
done
in class Behavior
Behavior.done()
public final int getPriority()
Behavior
getPriority
in class Behavior
public final void stop()