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

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GoalTemplate` | `goalOfType(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` | `hasBelief(java.lang.Object beliefName)` This method creates a goal template that positively matches a goal if it is of the type `BeliefPresentGoal` and has the given belief name.
    `static GoalTemplate` | `hasBeliefOfType(java.lang.Class<?> beliefNameClass)` This method creates a goal template that positively matches a goal if it is of the type `BeliefPresentGoal` and has a belief name of the given type.
    `static GoalTemplate` | `hasBeliefOfTypeWithNotNullValue(java.lang.Class<?> beliefNameClass)` This method creates a goal template that positively matches a goal if it is of the type `BeliefNotNullValueGoal`, has the a belief name of the given type.
    `static GoalTemplate` | `hasBeliefOfTypeWithNullValue(java.lang.Class<?> beliefNameClass)` This method creates a goal template that positively matches a goal if it is of the type `BeliefValueGoal`, has the a belief name of the given type, and is associated with a null value.
    `static GoalTemplate` | `hasBeliefOfTypeWithValue(java.lang.Class<?> beliefNameClass, java.lang.Object beliefValue)` This method creates a goal template that positively matches a goal if it is of the type `BeliefValueGoal`, is of the class of given belief name class, and has the given value.
    `static GoalTemplate` | `hasBeliefValue(java.lang.Object 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` | `hasBeliefValueOfType(java.lang.Object 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` | `hasBeliefWithNotNullValue(java.lang.Object beliefName)` This method creates a goal template that positively matches a goal if it is of the type `BeliefNotNullValueGoal`, has the given belief name.
    `static GoalTemplate` | `hasBeliefWithNullValue(java.lang.Object 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.
    `static GoalTemplate` | `hasNoBelief(java.lang.Object beliefName)` This method creates a goal template that positively matches a goal if it is of the type `BeliefNotPresentGoal` and has the given belief name.
    `static GoalTemplate` | `hasNoBeliefOfType(java.lang.Class<?> beliefNameClass)` This method creates a goal template that positively matches a goal if it is of the type `BeliefNotPresentGoal` and has the given belief name.
    `static GoalTemplate` | `hasValueInBeliefSet(java.lang.Object beliefName, java.lang.Object beliefValue)` This method creates a goal template that positively matches a goal if it is of the type `BeliefSetHasValueGoal`, has the given belief name, and has the given value.
    `static GoalTemplate` | `hasValueOfTypeInBeliefSet(java.lang.Object beliefName, java.lang.Class<?> beliefValueClass)` This method creates a goal template that positively matches a goal if it is of the type `BeliefSetHasValueGoal`, has the given belief name, and its value is of the given type.

    - ### 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

    - #### goalOfType

          public static GoalTemplate goalOfType(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.

    - #### hasBelief

          public static GoalTemplate hasBelief(java.lang.Object beliefName)

      This method creates a goal template that positively matches a goal if it is of the type `BeliefPresentGoal` 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 `BeliefPresentGoal` with the given name.

    - #### hasBeliefOfType

          public static GoalTemplate hasBeliefOfType(java.lang.Class<?> beliefNameClass)

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

    - #### hasBeliefOfTypeWithNotNullValue

          public static GoalTemplate hasBeliefOfTypeWithNotNullValue(java.lang.Class<?> beliefNameClass)

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

    - #### hasBeliefOfTypeWithNullValue

          public static GoalTemplate hasBeliefOfTypeWithNullValue(java.lang.Class<?> beliefNameClass)

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

    - #### hasBeliefOfTypeWithValue

          public static GoalTemplate hasBeliefOfTypeWithValue(java.lang.Class<?> beliefNameClass,
                                                              java.lang.Object beliefValue)

      This method creates a goal template that positively matches a goal if it is of the type `BeliefValueGoal`, is of the class of given belief name class, and has the given value.
      Parameters:
        `beliefNameClass` - the belief name class 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.

    - #### hasBeliefValue

          public static GoalTemplate hasBeliefValue(java.lang.Object 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.

    - #### hasBeliefValueOfType

          public static GoalTemplate hasBeliefValueOfType(java.lang.Object 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.

    - #### hasBeliefWithNotNullValue

          public static GoalTemplate hasBeliefWithNotNullValue(java.lang.Object beliefName)

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

    - #### hasBeliefWithNullValue

          public static GoalTemplate hasBeliefWithNullValue(java.lang.Object 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.

    - #### hasNoBelief

          public static GoalTemplate hasNoBelief(java.lang.Object beliefName)

      This method creates a goal template that positively matches a goal if it is of the type `BeliefNotPresentGoal` 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 `BeliefNotPresentGoal` with the given name.

    - #### hasNoBeliefOfType

          public static GoalTemplate hasNoBeliefOfType(java.lang.Class<?> beliefNameClass)

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

    - #### hasValueInBeliefSet

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

      This method creates a goal template that positively matches a goal if it is of the type `BeliefSetHasValueGoal`, 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 `BeliefSetHasValueGoal` with the given name and value.

    - #### hasValueOfTypeInBeliefSet

          public static GoalTemplate hasValueOfTypeInBeliefSet(java.lang.Object beliefName,
                                                               java.lang.Class<?> beliefValueClass)

      This method creates a goal template that positively matches a goal if it is of the type `BeliefSetHasValueGoal`, 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 `BeliefSetHasValueGoal` with the given name and value of the given type.