teamSpace.structure
Class GoalStack

java.lang.Object
  extended byteamSpace.structure.GoalStack

public class GoalStack
extends java.lang.Object

This class contains the goal stack - meaning the goals that are readily achieved. These goals are actually contained in the Rete rule engine. So this class is only an interface to this rule engine.


Constructor Summary
GoalStack(Rete ruleEngine)
           
 
Method Summary
 java.util.ArrayList getAchievedGoals()
          This method returns an ArrayList of achieved goals
 java.lang.String getGoalOutput(java.lang.String goalName)
          This method returns the output of a goal.
 void setFileWriter(FileWriter fileWriter)
          This method sets the FileWriter that handles printing the output of the problem solving steps to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoalStack

public GoalStack(Rete ruleEngine)
Method Detail

setFileWriter

public void setFileWriter(FileWriter fileWriter)
This method sets the FileWriter that handles printing the output of the problem solving steps to a file.

Parameters:
fileWriter - Reference to the FileWriter used by all agents working on the problem of one certain TR

getAchievedGoals

public java.util.ArrayList getAchievedGoals()
This method returns an ArrayList of achieved goals

Returns:
- An ArrayList of TSGoal

getGoalOutput

public java.lang.String getGoalOutput(java.lang.String goalName)
This method returns the output of a goal. The goal has to be achieved to have an output.

Parameters:
goalName - The name of the goal
Returns:
The output of the specified goal as a String, if the goal is not achieved an empty String is returned