bdi4jade.goal

## Class GoalTemplateFactory

- java.lang.Object
- - bdi4jade.goal.GoalTemplateFactory

-     public abstract class GoalTemplateFactory
      extends java.lang.Object

  This class provides a collection of static methods to create common goal templates.
  Author:
    Ingrid Nunes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GoalTemplateFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GoalTemplate` | `beliefGoal(java.lang.String beliefName)` This method creates a goal template that positively matches a goal if it is of the type `BeliefGoal` and has the given belief name.
    `static GoalTemplate` | `beliefSetTypeGoal(java.lang.String beliefName, java.lang.Class<?> beliefValueClass)` This method creates a goal template that positively matches a goal if it is of the type `BeliefSetValueGoal`, has the given belief name, and its value is of the given type.
    `static GoalTemplate` | `beliefSetValueGoal(java.lang.String beliefName, java.lang.Object beliefValue)` This method creates a goal template that positively matches a goal if it is of the type `BeliefSetValueGoal`, has the given belief name, and has the given value.
    `static GoalTemplate` | `beliefTypeGoal(java.lang.String beliefName, java.lang.Class<?> beliefValueClass)` This method creates a goal template that positively matches a goal if it is of the type `BeliefValueGoal`, has the given belief name, and its value is of the given type.
    `static GoalTemplate` | `beliefValueGoal(java.lang.String beliefName, java.lang.Object beliefValue)` This method creates a goal template that positively matches a goal if it is of the type `BeliefValueGoal`, has the given belief name, and has the given value.
    `static GoalTemplate` | `goalType(java.lang.Class<? extends Goal> goalClass)` This method creates a goal template that positively matches a goal if it is of the given type.
    `static GoalTemplate` | `nullBeliefValueGoal(java.lang.String beliefName)` This method creates a goal template that positively matches a goal if it is of the type `BeliefValueGoal`, has the given belief name, and is associated with a null value.

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

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

- - ### Constructor Detail

    - #### GoalTemplateFactory

          public GoalTemplateFactory()

  - ### Method Detail

    - #### beliefGoal

          public static GoalTemplate beliefGoal(java.lang.String beliefName)

      This method creates a goal template that positively matches a goal if it is of the type `BeliefGoal` and has the given belief name.
      Parameters:
        `beliefName` - the belief name to be matched.
      Returns:
        the goal template that checks if the goal is a `BeliefGoal` with the given name.

    - #### beliefSetTypeGoal

          public static GoalTemplate beliefSetTypeGoal(java.lang.String beliefName,
                                       java.lang.Class<?> beliefValueClass)

      This method creates a goal template that positively matches a goal if it is of the type `BeliefSetValueGoal`, has the given belief name, and its value is of the given type.
      Parameters:
        `beliefName` - the belief name to be matched.
        `beliefValueClass` - the value class name to be matched.
      Returns:
        the goal template that checks if the goal is a `BeliefSetValueGoal` with the given name and value of the given type.

    - #### beliefSetValueGoal

          public static GoalTemplate beliefSetValueGoal(java.lang.String beliefName,
                                        java.lang.Object beliefValue)

      This method creates a goal template that positively matches a goal if it is of the type `BeliefSetValueGoal`, has the given belief name, and has the given value.
      Parameters:
        `beliefName` - the belief name to be matched.
        `beliefValue` - the value to be matched.
      Returns:
        the goal template that checks if the goal is a `BeliefSetValueGoal` with the given name and value.

    - #### beliefTypeGoal

          public static GoalTemplate beliefTypeGoal(java.lang.String beliefName,
                                    java.lang.Class<?> beliefValueClass)

      This method creates a goal template that positively matches a goal if it is of the type `BeliefValueGoal`, has the given belief name, and its value is of the given type.
      Parameters:
        `beliefName` - the belief name to be matched.
        `beliefValueClass` - the value class name to be matched.
      Returns:
        the goal template that checks if the goal is a `BeliefValueGoal` with the given name and value of the given type.

    - #### beliefValueGoal

          public static GoalTemplate beliefValueGoal(java.lang.String beliefName,
                                     java.lang.Object beliefValue)

      This method creates a goal template that positively matches a goal if it is of the type `BeliefValueGoal`, has the given belief name, and has the given value.
      Parameters:
        `beliefName` - the belief name to be matched.
        `beliefValue` - the value to be matched.
      Returns:
        the goal template that checks if the goal is a `BeliefValueGoal` with the given name and value.

    - #### goalType

          public static GoalTemplate goalType(java.lang.Class<? extends Goal> goalClass)

      This method creates a goal template that positively matches a goal if it is of the given type.
      Parameters:
        `goalClass` - the goal class to be matched.
      Returns:
        the goal template that checks if the goal is of the given type.

    - #### nullBeliefValueGoal

          public static GoalTemplate nullBeliefValueGoal(java.lang.String beliefName)

      This method creates a goal template that positively matches a goal if it is of the type `BeliefValueGoal`, has the given belief name, and is associated with a null value.
      Parameters:
        `beliefName` - the belief name to be matched.
      Returns:
        the goal template that checks if the goal is a `BeliefValueGoal` with the given name and null value.