bdi4jade.util.goal

## Class CompositeGoal

- java.lang.Object
- - bdi4jade.util.goal.CompositeGoal

- All Implemented Interfaces:
    Goal, jade.content.Concept, jade.content.ContentElement, jade.content.Term, java.io.Serializable
  Direct Known Subclasses:
    ParallelGoal, SequentialGoal

      public abstract class CompositeGoal
      extends java.lang.Object
      implements Goal

  This class represents a goal that is a composition of other goals (subgoals). It has two subclasses, which indicate if the goals must be achieved in a parallel or sequential way.
  Author:
    ingrid
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompositeGoal(java.util.Collection<Goal> goals)` Instantiate a CompositeGoal with the provided goals.
    `CompositeGoal(Goal[] goals)` Instantiate a CompositeGoal with the provided goals array.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<Goal>` | `getCompletedGoals()`
    `GoalFinishedEvent` | `getFailedGoal()`
    `java.util.Collection<Goal>` | `getGoals()`
    `void` | `setCompletedGoals(java.util.List<Goal> completedGoals)`
    `void` | `setFailedGoal(GoalFinishedEvent failedGoal)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CompositeGoal

          public CompositeGoal(java.util.Collection<Goal> goals)

      Instantiate a CompositeGoal with the provided goals.
      Parameters:
        `goals` - the goals that compose this goal.

    - #### CompositeGoal

          public CompositeGoal(Goal[] goals)

      Instantiate a CompositeGoal with the provided goals array. A `Collection` is instantiated by the method `#createGoals()` and is initialized with the provided goals.
      Parameters:
        `goals` - the goals that compose this goal.

  - ### Method Detail

    - #### getCompletedGoals

          public java.util.List<Goal> getCompletedGoals()

      Returns:
        the completedGoals

    - #### getFailedGoal

          public GoalFinishedEvent getFailedGoal()

      Returns:
        the failedGoal

    - #### getGoals

          public java.util.Collection<Goal> getGoals()

      Returns:
        the goals

    - #### setCompletedGoals

          public void setCompletedGoals(java.util.List<Goal> completedGoals)

      Parameters:
        `completedGoals` - the completedGoals to set

    - #### setFailedGoal

          public void setFailedGoal(GoalFinishedEvent failedGoal)

      Parameters:
        `failedGoal` - the failedGoal to set