com.tibco.cep.kernel.model.rule

## Interface RuleFunction

-     public interface RuleFunction

  Runtime rule function.
  Since:
    2.0.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `RuleFunction.ParameterDescriptor` Describes a `RuleFunction` parameter.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `RuleFunction.ParameterDescriptor[]` | `getParameterDescriptors()` Gets all the parameter descriptors for this rule function.
    `java.lang.String` | `getSignature()` Returns the original signature of the `RuleFunction` in string format.
    `java.lang.Object` | `invoke(java.util.Map maps)` Invokes the rule function with a map.
    `java.lang.Object` | `invoke(java.lang.Object[] objects)` Invokes the rule function with an array of objects.

- - ### Method Detail

    - #### invoke

          java.lang.Object invoke(java.lang.Object[] objects)

      Invokes the rule function with an array of objects. The objects in the array have to follow the same order as the input parameters. Primitive types have to be boxed. Also, the return value will be boxed if it is primitive type.
      Parameters:
        `objects` - the input parameters for the rule function.
      Returns:
        return value of the rule function. If the return type is void, null will be returned.
      Since:
        2.0.0

    - #### invoke

          java.lang.Object invoke(java.util.Map maps)

      Invokes the rule function with a map. The input map should map the parameter name to its value. Input parameters of primitive type have to be boxed. The return value will be boxed if it is a primitive type.
      Parameters:
        `maps` - the input parameters for the rule function, maps the parameter name to the corresponding value.
      Returns:
        return value of the rule function. If the return type is void, null will be returned.
      Since:
        2.0.0

    - #### getSignature

          java.lang.String getSignature()

      Returns the original signature of the `RuleFunction` in string format.
      Returns:
        the original signature of the `RuleFunction` in string format
      Since:
        2.0.0

    - #### getParameterDescriptors

          RuleFunction.ParameterDescriptor[] getParameterDescriptors()

      Gets all the parameter descriptors for this rule function. Each `ParameterDescriptor` describe a parameter of this `RuleFunction`, except the last one, which has the name `"returnValue"` and describes the return type.
      Returns:
        a `ParameterDescriptor[]` for this `RuleFunction`.
      Since:
        2.0.0