mil.navy.nps.relate
Interface Rule

All Known Implementing Classes:
RuleCoordinate, RuleDefense1, RuleEngageEnemy, RuleGetEnemyFlag, RuleOffense1, RuleProtectOwnFlag

public interface Rule

This interface implements the RELATE Rule.

This interface requires the user to define the method "calculate" which receives a sensedEnvironment object and returns an object representing the result of the rules calculation. A toString() method is required to assist in the display and evaluation of the Rule.

Since:
JDK1.3
Version:
1.0, 17 Aug 00
Author:
Michael R. Dickson, Kimberly A. Roddy

Method Summary
 java.lang.Object calculate(SensedEnvironment pPE)
          Uses the passed in perceived environment as input to a calculation which returns an object which is the result of the calculation.
 java.lang.String toString()
          Returns a formated description of this Rule suitable for printing
 

Method Detail

calculate

public java.lang.Object calculate(SensedEnvironment pPE)
Uses the passed in perceived environment as input to a calculation which returns an object which is the result of the calculation.

Parameters:
pPE - The PerceivedEnvironment that the Rule uses for calculation.
Returns:
An object corresponding to the result of this calculation.

toString

public java.lang.String toString()
Returns a formated description of this Rule suitable for printing

Returns:
String message describing this Rule object.