atomicActions
Class Sleep
java.lang.Object
atomicActions.AtomicAction
atomicActions.Sleep
- All Implemented Interfaces:
- Serializable
public class Sleep
- extends AtomicAction
- implements Serializable
Sleep just leave agent sleeping - so it doesn't perform any exernal action, it just means agent will freeze
on the spot sleeping, so it never succeeds, it just fails on timeout
- Author:
- Ondrej
- See Also:
- Serialized Form
|
Method Summary |
void |
execute()
executes the atomic action, typicaly writes something to log, change agent name, so we can see
in the environment what is he doing, raise counter |
boolean |
failed()
Note that if it returns false, it doesn't mean that it succeeded, it means that it just hasn't finished yet. |
boolean |
succeeded()
Note that if it returns false, it doesn't mean that it failed, it means that it just hasn't finished yet. |
Sleep
public Sleep()
Sleep
public Sleep(Action parent,
Bot agent)
succeeded
public boolean succeeded()
- Description copied from class:
AtomicAction
- Note that if it returns false, it doesn't mean that it failed, it means that it just hasn't finished yet.
- Overrides:
succeeded in class AtomicAction
- Returns:
- true if the atomic action was successfully performed, false if not
failed
public boolean failed()
- Description copied from class:
AtomicAction
- Note that if it returns false, it doesn't mean that it succeeded, it means that it just hasn't finished yet.
- Overrides:
failed in class AtomicAction
- Returns:
- true if the atomic action failed - usualy timeouted, false if not
execute
public void execute()
- Description copied from class:
AtomicAction
- executes the atomic action, typicaly writes something to log, change agent name, so we can see
in the environment what is he doing, raise counter
- Overrides:
execute in class AtomicAction
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.