cs015.Swarm
Class DoNothingBehavior

java.lang.Object
  extended byNGP.Timer
      extended bycs015.Swarm.BeeBehavior
          extended bycs015.Swarm.DoNothingBehavior
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class DoNothingBehavior
extends BeeBehavior

This class represents a behavior that makes its target do nothing.


Constructor Summary
DoNothingBehavior()
          This constructor builds this behavior with a null target
DoNothingBehavior(Directional target)
          This constructor builds this behavior with a target to act on.
 
Method Summary
 void activate()
          Do not call this method yourself.
 BeeBehavior copy()
          This method returns a copy of the behavior.
 
Methods inherited from class cs015.Swarm.BeeBehavior
getTarget, setTarget
 
Methods inherited from class NGP.Timer
actionPerformed, getDelay, setDelay, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoNothingBehavior

public DoNothingBehavior()
This constructor builds this behavior with a null target


DoNothingBehavior

public DoNothingBehavior(Directional target)
This constructor builds this behavior with a target to act on. This target is passed on to the superclass.

Parameters:
target - The target this behavior will act on.
Method Detail

activate

public void activate()
Do not call this method yourself. This method is called at regular intervals to perform the actions of this behavior. When called, it does nothing.


copy

public BeeBehavior copy()
This method returns a copy of the behavior. It's target will be null. You will have to set the behavior's ratget using setTarget(...)

Specified by:
copy in class BeeBehavior
Returns:
a new DoNothingBehavior