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

## Interface ConstraintGraphNode

- All Known Subinterfaces:
    `BiConstraintGraphNode`, `QuadConstraintGraphNode`, `TriConstraintGraphNode`, `UniConstraintGraphChildNode`, `UniConstraintGraphNode`
  All Known Implementing Classes:
    `AbstractConstraintModelChildNode`, `AbstractConstraintModelGroupingNode`, `AbstractConstraintModelJoiningNode`, `AbstractConstraintModelNode`, `FromNode`

      public interface ConstraintGraphNode

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static <A,​B> BiConstraintGraphNode` | `filter​(BiPredicate<A,​B> predicate)` |
    `static <A> UniConstraintGraphChildNode` | `filter​(Predicate<A> predicate)` |
    `static <A,​B,​C,​D> QuadConstraintGraphNode` | `filter​(QuadPredicate<A,​B,​C,​D> predicate)` |
    `static <A,​B,​C> TriConstraintGraphNode` | `filter​(TriPredicate<A,​B,​C> predicate)` |
    `int` | `getCardinality()` |
    `List<ConstraintGraphNode>` | `getChildNodes()` | Retrieves an unmodifiable collection of unique nodes which follow this one.
    `List<ConstraintConsequence>` | `getConsequences()` | Retrieves an unmodifiable collection of unique consequences having this node as a terminal node.
    `<A> Class<A>` | `getFactType()` | Return `FromNode.getFactType()` of the ultimate parent node.
    `ConstraintGraphNodeType` | `getType()` |
    `static <A,​B,​GroupKey_> UniConstraintGraphChildNode` | `groupBy​(BiFunction<A,​B,​GroupKey_> mapping)` |
    `static <A,​B,​GroupKey_,​ResultContainer_,​Result_> BiConstraintGraphNode` | `groupBy​(BiFunction<A,​B,​GroupKey_> mapping, BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)` |
    `static <A,​B,​GroupKeyA_,​GroupKeyB_> BiConstraintGraphNode` | `groupBy​(BiFunction<A,​B,​GroupKeyA_> aMapping, BiFunction<A,​B,​GroupKeyB_> bMapping)` |
    `static <A,​B,​GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintGraphNode` | `groupBy​(BiFunction<A,​B,​GroupKeyA_> aMapping, BiFunction<A,​B,​GroupKeyB_> bMapping, BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)` |
    `static <A,​B,​GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintGraphNode` | `groupBy​(BiFunction<A,​B,​GroupKeyA_> aMapping, BiFunction<A,​B,​GroupKeyB_> bMapping, BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> cCollector, BiConstraintCollector<A,​B,​ResultContainerD_,​ResultD_> dCollector)` |
    `static <A,​GroupKey_> UniConstraintGraphChildNode` | `groupBy​(Function<A,​GroupKey_> mapping)` |
    `static <A,​GroupKey_,​ResultContainer_,​Result_> BiConstraintGraphNode` | `groupBy​(Function<A,​GroupKey_> mapping, UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` |
    `static <A,​GroupKeyA_,​GroupKeyB_> BiConstraintGraphNode` | `groupBy​(Function<A,​GroupKeyA_> aMapping, Function<A,​GroupKeyB_> bMapping)` |
    `static <A,​GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintGraphNode` | `groupBy​(Function<A,​GroupKeyA_> aMapping, Function<A,​GroupKeyB_> bMapping, UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` |
    `static <A,​GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintGraphNode` | `groupBy​(Function<A,​GroupKeyA_> aMapping, Function<A,​GroupKeyB_> bMapping, UniConstraintCollector<A,​ResultContainerC_,​ResultC_> cCollector, UniConstraintCollector<A,​ResultContainerD_,​ResultD_> dCollector)` |
    `static <A,​B,​C,​D,​GroupKey_> UniConstraintGraphChildNode` | `groupBy​(QuadFunction<A,​B,​C,​D,​GroupKey_> mapping)` |
    `static <A,​B,​C,​D,​GroupKey_,​ResultContainer_,​Result_> BiConstraintGraphNode` | `groupBy​(QuadFunction<A,​B,​C,​D,​GroupKey_> mapping, QuadConstraintCollector<A,​B,​C,​D,​ResultContainer_,​Result_> collector)` |
    `static <A,​B,​C,​D,​GroupKeyA_,​GroupKeyB_> BiConstraintGraphNode` | `groupBy​(QuadFunction<A,​B,​C,​D,​GroupKeyA_> aMapping, QuadFunction<A,​B,​C,​D,​GroupKeyB_> bMapping)` |
    `static <A,​B,​C,​D,​GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintGraphNode` | `groupBy​(QuadFunction<A,​B,​C,​D,​GroupKeyA_> aMapping, QuadFunction<A,​B,​C,​D,​GroupKeyB_> bMapping, QuadConstraintCollector<A,​B,​C,​D,​ResultContainer_,​Result_> collector)` |
    `static <A,​B,​C,​D,​GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintGraphNode` | `groupBy​(QuadFunction<A,​B,​C,​D,​GroupKeyA_> aMapping, QuadFunction<A,​B,​C,​D,​GroupKeyB_> bMapping, QuadConstraintCollector<A,​B,​C,​D,​ResultContainerC_,​ResultC_> cCollector, QuadConstraintCollector<A,​B,​C,​D,​ResultContainerD_,​ResultD_> dCollector)` |
    `static <A,​B,​C,​GroupKey_> UniConstraintGraphChildNode` | `groupBy​(TriFunction<A,​B,​C,​GroupKey_> mapping)` |
    `static <A,​B,​C,​GroupKey_,​ResultContainer_,​Result_> BiConstraintGraphNode` | `groupBy​(TriFunction<A,​B,​C,​GroupKey_> mapping, TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)` |
    `static <A,​B,​C,​GroupKeyA_,​GroupKeyB_> BiConstraintGraphNode` | `groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> aMapping, TriFunction<A,​B,​C,​GroupKeyB_> bMapping)` |
    `static <A,​B,​C,​GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintGraphNode` | `groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> aMapping, TriFunction<A,​B,​C,​GroupKeyB_> bMapping, TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)` |
    `static <A,​B,​C,​GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintGraphNode` | `groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> aMapping, TriFunction<A,​B,​C,​GroupKeyB_> bMapping, TriConstraintCollector<A,​B,​C,​ResultContainerC_,​ResultC_> cCollector, TriConstraintCollector<A,​B,​C,​ResultContainerD_,​ResultD_> dCollector)` |
    `static <A,​B,​ResultContainer_,​Result_> UniConstraintGraphChildNode` | `groupBy​(BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)` |
    `static <A,​B,​C,​D,​ResultContainer_,​Result_> UniConstraintGraphChildNode` | `groupBy​(QuadConstraintCollector<A,​B,​C,​D,​ResultContainer_,​Result_> collector)` |
    `static <A,​B,​C,​ResultContainer_,​Result_> UniConstraintGraphChildNode` | `groupBy​(TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)` |
    `static <A,​ResultContainer_,​Result_> UniConstraintGraphChildNode` | `groupBy​(UniConstraintCollector<A,​ResultContainer_,​Result_> collector)` |
    `static <A,​B> UniConstraintGraphChildNode` | `ifExists​(Class<B> otherFactType, BiJoiner<A,​B>... joiners)` |
    `static <A,​B,​C> BiConstraintGraphNode` | `ifExists​(Class<C> otherFactType, TriJoiner<A,​B,​C>... joiners)` |
    `static <A,​B,​C,​D> TriConstraintGraphNode` | `ifExists​(Class<D> otherFactType, QuadJoiner<A,​B,​C,​D>... joiners)` |
    `static <A,​B,​C,​D,​E> QuadConstraintGraphNode` | `ifExists​(Class<E> otherFactType, PentaJoiner<A,​B,​C,​D,​E>... joiners)` |
    `static <A,​B> UniConstraintGraphChildNode` | `ifNotExists​(Class<B> otherFactType, BiJoiner<A,​B>... joiners)` |
    `static <A,​B,​C> BiConstraintGraphNode` | `ifNotExists​(Class<C> otherFactType, TriJoiner<A,​B,​C>... joiners)` |
    `static <A,​B,​C,​D> TriConstraintGraphNode` | `ifNotExists​(Class<D> otherFactType, QuadJoiner<A,​B,​C,​D>... joiners)` |
    `static <A,​B,​C,​D,​E> QuadConstraintGraphNode` | `ifNotExists​(Class<E> otherFactType, PentaJoiner<A,​B,​C,​D,​E>... joiners)` |
    `static <A,​B> BiConstraintGraphNode` | `join​(Class<B> otherFactType, BiJoiner<A,​B> joiner)` |
    `static <A,​B,​C> TriConstraintGraphNode` | `join​(Class<C> otherFactType, TriJoiner<A,​B,​C> joiner)` |
    `static <A,​B,​C,​D> QuadConstraintGraphNode` | `join​(Class<D> otherFactType, QuadJoiner<A,​B,​C,​D> joiner)` |

- - ### Method Detail

    - #### filter

          static <A> UniConstraintGraphChildNode filter​(Predicate<A> predicate)

    - #### filter

          static <A,​B> BiConstraintGraphNode filter​(BiPredicate<A,​B> predicate)

    - #### filter

          static <A,​B,​C> TriConstraintGraphNode filter​(TriPredicate<A,​B,​C> predicate)

    - #### filter

          static <A,​B,​C,​D> QuadConstraintGraphNode filter​(QuadPredicate<A,​B,​C,​D> predicate)

    - #### join

          static <A,​B> BiConstraintGraphNode join​(Class<B> otherFactType,
                                                        BiJoiner<A,​B> joiner)

    - #### join

          static <A,​B,​C> TriConstraintGraphNode join​(Class<C> otherFactType,
                                                                 TriJoiner<A,​B,​C> joiner)

    - #### join

          static <A,​B,​C,​D> QuadConstraintGraphNode join​(Class<D> otherFactType,
                                                                          QuadJoiner<A,​B,​C,​D> joiner)

    - #### ifExists

          static <A,​B> UniConstraintGraphChildNode ifExists​(Class<B> otherFactType,
                                                                  BiJoiner<A,​B>... joiners)

    - #### ifExists

          static <A,​B,​C> BiConstraintGraphNode ifExists​(Class<C> otherFactType,
                                                                    TriJoiner<A,​B,​C>... joiners)

    - #### ifExists

          static <A,​B,​C,​D> TriConstraintGraphNode ifExists​(Class<D> otherFactType,
                                                                             QuadJoiner<A,​B,​C,​D>... joiners)

    - #### ifExists

          static <A,​B,​C,​D,​E> QuadConstraintGraphNode ifExists​(Class<E> otherFactType,
                                                                                      PentaJoiner<A,​B,​C,​D,​E>... joiners)

    - #### ifNotExists

          static <A,​B> UniConstraintGraphChildNode ifNotExists​(Class<B> otherFactType,
                                                                     BiJoiner<A,​B>... joiners)

    - #### ifNotExists

          static <A,​B,​C> BiConstraintGraphNode ifNotExists​(Class<C> otherFactType,
                                                                       TriJoiner<A,​B,​C>... joiners)

    - #### ifNotExists

          static <A,​B,​C,​D> TriConstraintGraphNode ifNotExists​(Class<D> otherFactType,
                                                                                QuadJoiner<A,​B,​C,​D>... joiners)

    - #### ifNotExists

          static <A,​B,​C,​D,​E> QuadConstraintGraphNode ifNotExists​(Class<E> otherFactType,
                                                                                         PentaJoiner<A,​B,​C,​D,​E>... joiners)

    - #### groupBy

          static <A,​GroupKey_> UniConstraintGraphChildNode groupBy​(Function<A,​GroupKey_> mapping)

    - #### groupBy

          static <A,​GroupKeyA_,​GroupKeyB_> BiConstraintGraphNode groupBy​(Function<A,​GroupKeyA_> aMapping,
                                                                                     Function<A,​GroupKeyB_> bMapping)

    - #### groupBy

          static <A,​ResultContainer_,​Result_> UniConstraintGraphChildNode groupBy​(UniConstraintCollector<A,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​GroupKey_,​ResultContainer_,​Result_> BiConstraintGraphNode groupBy​(Function<A,​GroupKey_> mapping,
                                                                                                        UniConstraintCollector<A,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintGraphNode groupBy​(Function<A,​GroupKeyA_> aMapping,
                                                                                                                           Function<A,​GroupKeyB_> bMapping,
                                                                                                                           UniConstraintCollector<A,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintGraphNode groupBy​(Function<A,​GroupKeyA_> aMapping,
                                                                                                                                                                     Function<A,​GroupKeyB_> bMapping,
                                                                                                                                                                     UniConstraintCollector<A,​ResultContainerC_,​ResultC_> cCollector,
                                                                                                                                                                     UniConstraintCollector<A,​ResultContainerD_,​ResultD_> dCollector)

    - #### groupBy

          static <A,​B,​ResultContainer_,​Result_> UniConstraintGraphChildNode groupBy​(BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​B,​GroupKey_> UniConstraintGraphChildNode groupBy​(BiFunction<A,​B,​GroupKey_> mapping)

    - #### groupBy

          static <A,​B,​GroupKey_,​ResultContainer_,​Result_> BiConstraintGraphNode groupBy​(BiFunction<A,​B,​GroupKey_> mapping,
                                                                                                                BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​B,​GroupKeyA_,​GroupKeyB_> BiConstraintGraphNode groupBy​(BiFunction<A,​B,​GroupKeyA_> aMapping,
                                                                                             BiFunction<A,​B,​GroupKeyB_> bMapping)

    - #### groupBy

          static <A,​B,​GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintGraphNode groupBy​(BiFunction<A,​B,​GroupKeyA_> aMapping,
                                                                                                                                   BiFunction<A,​B,​GroupKeyB_> bMapping,
                                                                                                                                   BiConstraintCollector<A,​B,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​B,​GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintGraphNode groupBy​(BiFunction<A,​B,​GroupKeyA_> aMapping,
                                                                                                                                                                             BiFunction<A,​B,​GroupKeyB_> bMapping,
                                                                                                                                                                             BiConstraintCollector<A,​B,​ResultContainerC_,​ResultC_> cCollector,
                                                                                                                                                                             BiConstraintCollector<A,​B,​ResultContainerD_,​ResultD_> dCollector)

    - #### groupBy

          static <A,​B,​C,​ResultContainer_,​Result_> UniConstraintGraphChildNode groupBy​(TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​B,​C,​GroupKey_> UniConstraintGraphChildNode groupBy​(TriFunction<A,​B,​C,​GroupKey_> mapping)

    - #### groupBy

          static <A,​B,​C,​GroupKey_,​ResultContainer_,​Result_> BiConstraintGraphNode groupBy​(TriFunction<A,​B,​C,​GroupKey_> mapping,
                                                                                                                        TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​B,​C,​GroupKeyA_,​GroupKeyB_> BiConstraintGraphNode groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> aMapping,
                                                                                                     TriFunction<A,​B,​C,​GroupKeyB_> bMapping)

    - #### groupBy

          static <A,​B,​C,​GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintGraphNode groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> aMapping,
                                                                                                                                           TriFunction<A,​B,​C,​GroupKeyB_> bMapping,
                                                                                                                                           TriConstraintCollector<A,​B,​C,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​B,​C,​GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintGraphNode groupBy​(TriFunction<A,​B,​C,​GroupKeyA_> aMapping,
                                                                                                                                                                                     TriFunction<A,​B,​C,​GroupKeyB_> bMapping,
                                                                                                                                                                                     TriConstraintCollector<A,​B,​C,​ResultContainerC_,​ResultC_> cCollector,
                                                                                                                                                                                     TriConstraintCollector<A,​B,​C,​ResultContainerD_,​ResultD_> dCollector)

    - #### groupBy

          static <A,​B,​C,​D,​ResultContainer_,​Result_> UniConstraintGraphChildNode groupBy​(QuadConstraintCollector<A,​B,​C,​D,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​B,​C,​D,​GroupKey_> UniConstraintGraphChildNode groupBy​(QuadFunction<A,​B,​C,​D,​GroupKey_> mapping)

    - #### groupBy

          static <A,​B,​C,​D,​GroupKey_,​ResultContainer_,​Result_> BiConstraintGraphNode groupBy​(QuadFunction<A,​B,​C,​D,​GroupKey_> mapping,
                                                                                                                                QuadConstraintCollector<A,​B,​C,​D,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​B,​C,​D,​GroupKeyA_,​GroupKeyB_> BiConstraintGraphNode groupBy​(QuadFunction<A,​B,​C,​D,​GroupKeyA_> aMapping,
                                                                                                             QuadFunction<A,​B,​C,​D,​GroupKeyB_> bMapping)

    - #### groupBy

          static <A,​B,​C,​D,​GroupKeyA_,​GroupKeyB_,​ResultContainer_,​Result_> TriConstraintGraphNode groupBy​(QuadFunction<A,​B,​C,​D,​GroupKeyA_> aMapping,
                                                                                                                                                   QuadFunction<A,​B,​C,​D,​GroupKeyB_> bMapping,
                                                                                                                                                   QuadConstraintCollector<A,​B,​C,​D,​ResultContainer_,​Result_> collector)

    - #### groupBy

          static <A,​B,​C,​D,​GroupKeyA_,​GroupKeyB_,​ResultContainerC_,​ResultC_,​ResultContainerD_,​ResultD_> QuadConstraintGraphNode groupBy​(QuadFunction<A,​B,​C,​D,​GroupKeyA_> aMapping,
                                                                                                                                                                                             QuadFunction<A,​B,​C,​D,​GroupKeyB_> bMapping,
                                                                                                                                                                                             QuadConstraintCollector<A,​B,​C,​D,​ResultContainerC_,​ResultC_> cCollector,
                                                                                                                                                                                             QuadConstraintCollector<A,​B,​C,​D,​ResultContainerD_,​ResultD_> dCollector)

    - #### getCardinality

          int getCardinality()

    - #### getType

          ConstraintGraphNodeType getType()

    - #### getFactType

          <A> Class<A> getFactType()

      Return `FromNode.getFactType()` of the ultimate parent node.
      Type Parameters:
        `A` - Generic return type, choose the one you need at the call site.
      Returns:
        null when the ultimate parent is a join/groupBy node

    - #### getChildNodes

          List<ConstraintGraphNode> getChildNodes()

      Retrieves an unmodifiable collection of unique nodes which follow this one.
      Returns:
        never null, may be empty when `getConsequences()` is not or when the model is not yet fully built.

    - #### getConsequences

          List<ConstraintConsequence> getConsequences()

      Retrieves an unmodifiable collection of unique consequences having this node as a terminal node.
      Returns:
        never null, may be empty when `getChildNodes()` is not or when the model is not yet fully built.