Class GoalLibrary

java.lang.Object
FAtiMA.Core.goals.GoalLibrary
All Implemented Interfaces:
Serializable

public class GoalLibrary extends Object implements Serializable
Stores information about all goals in the domain
Author:
Joao Dias
See Also:
  • Constructor Details

    • GoalLibrary

      public GoalLibrary(String file) throws GoalLibParsingException
      Creates a new GoalLibrary
      Parameters:
      file - - the file that contains the information about goals and that will be parsed
      Throws:
      GoalLibParsingException - - thrown when there is a parsing error when reading the GoalLibrary file
  • Method Details

    • AddGoal

      public void AddGoal(Goal g)
    • GetGoals

      public ListIterator<Goal> GetGoals()
      Gets a ListIterator that allows you to iterate over the goals stored in the goal's library
      Returns:
      a ListIterator over goals
    • GetGoal

      public Goal GetGoal(Name goalName)
      Searches for a goal with the given name in the Library. If such goal is found, it is returned.
      Returns:
      the searched goal if exists in the GoalLibrary, null otherwise