RoboJDETM v2.0

com.ridgesoft.robotics
Interface Behavior2

All Superinterfaces:
Behavior
All Known Implementing Classes:
AbstractBehavior2, AvoidBehavior, GoToBehavior, StopBehavior

public interface Behavior2
extends Behavior

Extends the Behavior interface.

This extended interface provides methods to enable and disable the behavior as well as manage a BehaviorListener for the behavior. See the BehaviorArbiter class for more information.

See Also:
BehaviorArbiter, Behavior, BehaviorEvent, BehaviorListener, com.ridgesoft.robotics.behaviors

Method Summary
 void setEnabled(boolean enabled)
          Enables or disables the behavior.
 void setListener(BehaviorListener listener)
          Sets or clears the listener for the behavior.
 
Methods inherited from interface com.ridgesoft.robotics.Behavior
poll, setActive
 

Method Detail

setEnabled

void setEnabled(boolean enabled)
Enables or disables the behavior.

When a behavior is disabled, its polling method is still called, but it must always return false from the poll method, indicating it is not interested in controlling the robot.

Parameters:
enabled - true if the behavior is being enabled, otherwise false

setListener

void setListener(BehaviorListener listener)
Sets or clears the listener for the behavior.

Parameters:
listener - the BehaviorListener, or null to clear the listener

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com