demo.helicopter
Class RuleProtectOwnFlag

java.lang.Object
  extended bydemo.helicopter.RuleProtectOwnFlag
All Implemented Interfaces:
Rule

public class RuleProtectOwnFlag
extends java.lang.Object
implements Rule

Rule interface for use with the RELATE architecture. Requires the user to define the method "calculate" which receives a perceived environment and returns and integer symbolizing the selected action chosen by this Rule.

Since:
JDK1.3
Version:
0.2, 20 Jul 00
Author:
Michael R. Dickson, Kimberly A. Roddy

Constructor Summary
RuleProtectOwnFlag()
           
 
Method Summary
 java.lang.Object calculate(SensedEnvironment pPE)
          Uses the passed in perceived environment as input to a calculation which selects one of a finite number of previously defined (and enumerated) actions to be returned.
 java.lang.String toString()
          Returns a formated description of this Rule suitable for printing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleProtectOwnFlag

public RuleProtectOwnFlag()
Method Detail

calculate

public java.lang.Object calculate(SensedEnvironment pPE)
Uses the passed in perceived environment as input to a calculation which selects one of a finite number of previously defined (and enumerated) actions to be returned.

Specified by:
calculate in interface Rule
Parameters:
pPE - The PerceivedEnvironment that the Rule uses to calculate the action determined by this Rule.
Returns:
An integer corresponding to the action selected by this calculation.

toString

public java.lang.String toString()
Description copied from interface: Rule
Returns a formated description of this Rule suitable for printing

Specified by:
toString in interface Rule