Package org.optaplanner.core.impl.score.stream.drools.common

## Interface PatternVariable<A,​PatternVar_,​Child_ extends PatternVariable<A,​PatternVar_,​Child_>>

-     public interface PatternVariable<A,​PatternVar_,​Child_ extends PatternVariable<A,​PatternVar_,​Child_>>

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Child_` | `addDependentExpression​(org.drools.model.view.ViewItem<?> expression)` |
    `<BoundVar_> Child_` | `bind​(org.drools.model.Variable<BoundVar_> boundVariable, Function<A,​BoundVar_> bindingFunction)` | Bind a new variable.
    `<BoundVar_,​LeftJoinVar_> Child_` | `bind​(org.drools.model.Variable<BoundVar_> boundVariable, org.drools.model.Variable<LeftJoinVar_> leftJoinVariable, BiFunction<A,​LeftJoinVar_,​BoundVar_> bindingFunction)` | This must only be used in patterns that will eventually end up in accumulate() or groupBy().
    `<BoundVar_,​LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_> Child_` | `bind​(org.drools.model.Variable<BoundVar_> boundVariable, org.drools.model.Variable<LeftJoinVarA_> leftJoinVariableA, org.drools.model.Variable<LeftJoinVarB_> leftJoinVariableB, org.drools.model.Variable<LeftJoinVarC_> leftJoinVariableC, QuadFunction<A,​LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_,​BoundVar_> bindingFunction)` | As defined by `bind(Variable, Variable, BiFunction)`.
    `<BoundVar_,​LeftJoinVarA_,​LeftJoinVarB_> Child_` | `bind​(org.drools.model.Variable<BoundVar_> boundVariable, org.drools.model.Variable<LeftJoinVarA_> leftJoinVariableA, org.drools.model.Variable<LeftJoinVarB_> leftJoinVariableB, TriFunction<A,​LeftJoinVarA_,​LeftJoinVarB_,​BoundVar_> bindingFunction)` | As defined by `bind(Variable, Variable, BiFunction)`.
    `List<org.drools.model.view.ViewItem<?>>` | `build()` |
    `<LeftJoinVar_> Child_` | `filter​(BiPredicate<LeftJoinVar_,​A> predicate, org.drools.model.Variable<LeftJoinVar_> leftJoinVariable)` |
    `Child_` | `filter​(Predicate<A> predicate)` |
    `<LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_> Child_` | `filter​(QuadPredicate<LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_,​A> predicate, org.drools.model.Variable<LeftJoinVarA_> leftJoinVariableA, org.drools.model.Variable<LeftJoinVarB_> leftJoinVariableB, org.drools.model.Variable<LeftJoinVarC_> leftJoinVariableC)` |
    `<LeftJoinVarA_,​LeftJoinVarB_> Child_` | `filter​(TriPredicate<LeftJoinVarA_,​LeftJoinVarB_,​A> predicate, org.drools.model.Variable<LeftJoinVarA_> leftJoinVariableA, org.drools.model.Variable<LeftJoinVarB_> leftJoinVariableB)` |
    `<LeftJoinVar_> PatternVariable<A,​PatternVar_,​Child_>` | `filterForJoin​(org.drools.model.Variable<LeftJoinVar_> leftJoinVar, AbstractBiJoiner<LeftJoinVar_,​A> joiner, JoinerType joinerType, int mappingIndex)` |
    `<LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_> PatternVariable<A,​PatternVar_,​Child_>` | `filterForJoin​(org.drools.model.Variable<LeftJoinVarA_> leftJoinVarA, org.drools.model.Variable<LeftJoinVarB_> leftJoinVarB, org.drools.model.Variable<LeftJoinVarC_> leftJoinVarC, AbstractQuadJoiner<LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_,​A> joiner, JoinerType joinerType, int mappingIndex)` |
    `<LeftJoinVarA_,​LeftJoinVarB_> PatternVariable<A,​PatternVar_,​Child_>` | `filterForJoin​(org.drools.model.Variable<LeftJoinVarA_> leftJoinVarA, org.drools.model.Variable<LeftJoinVarB_> leftJoinVarB, AbstractTriJoiner<LeftJoinVarA_,​LeftJoinVarB_,​A> joiner, JoinerType joinerType, int mappingIndex)` |
    `List<org.drools.model.view.ViewItem<?>>` | `getDependentExpressions()` |
    `List<org.drools.model.view.ViewItem<?>>` | `getPrerequisiteExpressions()` |
    `org.drools.model.Variable<A>` | `getPrimaryVariable()` |
    `<NewA> PatternVariable<NewA,​PatternVar_,​?>` | `map​(org.drools.model.Variable<NewA> boundVariable, Function<A,​NewA> mappingFunction)` |

- - ### Method Detail

    - #### getPrimaryVariable

          org.drools.model.Variable<A> getPrimaryVariable()

    - #### getPrerequisiteExpressions

          List<org.drools.model.view.ViewItem<?>> getPrerequisiteExpressions()

    - #### getDependentExpressions

          List<org.drools.model.view.ViewItem<?>> getDependentExpressions()

    - #### filter

          Child_ filter​(Predicate<A> predicate)

    - #### filter

          <LeftJoinVar_> Child_ filter​(BiPredicate<LeftJoinVar_,​A> predicate,
                                       org.drools.model.Variable<LeftJoinVar_> leftJoinVariable)

    - #### filter

          <LeftJoinVarA_,​LeftJoinVarB_> Child_ filter​(TriPredicate<LeftJoinVarA_,​LeftJoinVarB_,​A> predicate,
                                                            org.drools.model.Variable<LeftJoinVarA_> leftJoinVariableA,
                                                            org.drools.model.Variable<LeftJoinVarB_> leftJoinVariableB)

    - #### filter

          <LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_> Child_ filter​(QuadPredicate<LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_,​A> predicate,
                                                                                org.drools.model.Variable<LeftJoinVarA_> leftJoinVariableA,
                                                                                org.drools.model.Variable<LeftJoinVarB_> leftJoinVariableB,
                                                                                org.drools.model.Variable<LeftJoinVarC_> leftJoinVariableC)

    - #### filterForJoin

          <LeftJoinVar_> PatternVariable<A,​PatternVar_,​Child_> filterForJoin​(org.drools.model.Variable<LeftJoinVar_> leftJoinVar,
                                                                                         AbstractBiJoiner<LeftJoinVar_,​A> joiner,
                                                                                         JoinerType joinerType,
                                                                                         int mappingIndex)

    - #### filterForJoin

          <LeftJoinVarA_,​LeftJoinVarB_> PatternVariable<A,​PatternVar_,​Child_> filterForJoin​(org.drools.model.Variable<LeftJoinVarA_> leftJoinVarA,
                                                                                                              org.drools.model.Variable<LeftJoinVarB_> leftJoinVarB,
                                                                                                              AbstractTriJoiner<LeftJoinVarA_,​LeftJoinVarB_,​A> joiner,
                                                                                                              JoinerType joinerType,
                                                                                                              int mappingIndex)

    - #### filterForJoin

          <LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_> PatternVariable<A,​PatternVar_,​Child_> filterForJoin​(org.drools.model.Variable<LeftJoinVarA_> leftJoinVarA,
                                                                                                                                  org.drools.model.Variable<LeftJoinVarB_> leftJoinVarB,
                                                                                                                                  org.drools.model.Variable<LeftJoinVarC_> leftJoinVarC,
                                                                                                                                  AbstractQuadJoiner<LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_,​A> joiner,
                                                                                                                                  JoinerType joinerType,
                                                                                                                                  int mappingIndex)

    - #### bind

          <BoundVar_> Child_ bind​(org.drools.model.Variable<BoundVar_> boundVariable,
                                  Function<A,​BoundVar_> bindingFunction)

      Bind a new variable. This call is safe for use outside accumulate() and groupBy(), unlike `bind(Variable, Variable, BiFunction)` etc.
      Type Parameters:
        `BoundVar_` - generic type of the bound variable
      Parameters:
        `boundVariable` - the new variable
        `bindingFunction` - the function to apply to create the bound variable
      Returns:
        never null

    - #### bind

          <BoundVar_,​LeftJoinVar_> Child_ bind​(org.drools.model.Variable<BoundVar_> boundVariable,
                                                     org.drools.model.Variable<LeftJoinVar_> leftJoinVariable,
                                                     BiFunction<A,​LeftJoinVar_,​BoundVar_> bindingFunction)

      This must only be used in patterns that will eventually end up in accumulate() or groupBy(). Drools does not support binding 2+ variables outside of accumulate() or groupBy(). Disobeying will result in Drools `NullPointerException` at runtime.
      Type Parameters:
        `BoundVar_` - generic type of the bound variable
        `LeftJoinVar_` - generic type of the join variable
      Parameters:
        `boundVariable` - the new variable
        `leftJoinVariable` - the variable to use when creating the bound variable
        `bindingFunction` - the function to apply to create the bound variable
      Returns:
        never null

    - #### bind

          <BoundVar_,​LeftJoinVarA_,​LeftJoinVarB_> Child_ bind​(org.drools.model.Variable<BoundVar_> boundVariable,
                                                                          org.drools.model.Variable<LeftJoinVarA_> leftJoinVariableA,
                                                                          org.drools.model.Variable<LeftJoinVarB_> leftJoinVariableB,
                                                                          TriFunction<A,​LeftJoinVarA_,​LeftJoinVarB_,​BoundVar_> bindingFunction)

      As defined by `bind(Variable, Variable, BiFunction)`.
      Type Parameters:
        `BoundVar_` - generic type of the bound variable
        `LeftJoinVarA_` - generic type of the first join variable
        `LeftJoinVarB_` - generic type of the second join variable
      Parameters:
        `boundVariable` - the new variable
        `leftJoinVariableA` - the first variable to use when creating the bound variable
        `leftJoinVariableB` - the second variable to use when creating the bound variable
        `bindingFunction` - the function to apply to create the bound variable
      Returns:
        never null

    - #### bind

          <BoundVar_,​LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_> Child_ bind​(org.drools.model.Variable<BoundVar_> boundVariable,
                                                                                              org.drools.model.Variable<LeftJoinVarA_> leftJoinVariableA,
                                                                                              org.drools.model.Variable<LeftJoinVarB_> leftJoinVariableB,
                                                                                              org.drools.model.Variable<LeftJoinVarC_> leftJoinVariableC,
                                                                                              QuadFunction<A,​LeftJoinVarA_,​LeftJoinVarB_,​LeftJoinVarC_,​BoundVar_> bindingFunction)

      As defined by `bind(Variable, Variable, BiFunction)`.
      Type Parameters:
        `BoundVar_` - generic type of the bound variable
        `LeftJoinVarA_` - generic type of the first join variable
        `LeftJoinVarB_` - generic type of the second join variable
        `LeftJoinVarC_` - generic type of the third join variable
      Parameters:
        `boundVariable` - the new variable
        `leftJoinVariableA` - the first variable to use when creating the bound variable
        `leftJoinVariableB` - the second variable to use when creating the bound variable
        `leftJoinVariableC` - the third variable to use when creating the bound variable
        `bindingFunction` - the function to apply to create the bound variable
      Returns:
        never null

    - #### map

          <NewA> PatternVariable<NewA,​PatternVar_,​?> map​(org.drools.model.Variable<NewA> boundVariable,
                                                                     Function<A,​NewA> mappingFunction)

    - #### addDependentExpression

          Child_ addDependentExpression​(org.drools.model.view.ViewItem<?> expression)

    - #### build

          List<org.drools.model.view.ViewItem<?>> build()