de.xabsl.jxabsl.behavior
Class Behavior

java.lang.Object
  extended by de.xabsl.jxabsl.symbols.NamedItem
      extended by de.xabsl.jxabsl.behavior.Behavior
Direct Known Subclasses:
BasicBehavior, Option

public abstract class Behavior
extends NamedItem

Parent class for Option and BasicBehavior


Field Summary
protected  boolean active
           
protected  Parameters parameters
           
protected  TimeFunction timeOfExecution
           
protected  long timeWhenActivated
           
protected  long tOE
           
protected  boolean wasActive
           
 
Fields inherited from class de.xabsl.jxabsl.symbols.NamedItem
debug, name
 
Constructor Summary
Behavior(java.lang.String name, DebugMessages debug)
          Constructor.
 
Method Summary
abstract  void execute()
          executes the behavior
 Parameters getParameters()
           
 long getTimeOfExecution()
          the time how long the option is already active
 long getTimeWhenActivated()
          the time when the option was activated
 boolean isActive()
          the behavior is activated in the current path through the option graph
 void setActive(boolean active)
          set if the behavior is activated in the current path through the option graph
 void setTimeOfExecution(long timeOfExecution)
          set the time how long the option is already active
 void setTimeWhenActivated(long timeWhenActivated)
          set the time when the option was activated
 void setWasActive(boolean active)
          set if the behavior was activated in the last path through the option graph
 boolean wasActive()
          the behavior was activated in the last path through the option graph
 
Methods inherited from class de.xabsl.jxabsl.symbols.NamedItem
getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

active

protected boolean active

wasActive

protected boolean wasActive

tOE

protected long tOE

timeOfExecution

protected TimeFunction timeOfExecution

timeWhenActivated

protected long timeWhenActivated

parameters

protected Parameters parameters
Constructor Detail

Behavior

public Behavior(java.lang.String name,
                DebugMessages debug)
Constructor.

Parameters:
name - The name of the behavior. For debugging purposes.
Method Detail

isActive

public boolean isActive()
the behavior is activated in the current path through the option graph


setActive

public void setActive(boolean active)
set if the behavior is activated in the current path through the option graph


wasActive

public boolean wasActive()
the behavior was activated in the last path through the option graph


setWasActive

public void setWasActive(boolean active)
set if the behavior was activated in the last path through the option graph


execute

public abstract void execute()
executes the behavior


getParameters

public Parameters getParameters()
Returns:
The parameters of the behavior

setTimeWhenActivated

public void setTimeWhenActivated(long timeWhenActivated)
set the time when the option was activated


getTimeWhenActivated

public long getTimeWhenActivated()
the time when the option was activated


setTimeOfExecution

public void setTimeOfExecution(long timeOfExecution)
set the time how long the option is already active


getTimeOfExecution

public long getTimeOfExecution()
the time how long the option is already active