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

## Class AbstractConstraintStreamHelper<Right,​JoinedStream,​Joiner,​Predicate>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.common.AbstractConstraintStreamHelper<Right,​JoinedStream,​Joiner,​Predicate>

- Direct Known Subclasses:
    `BiConstraintStreamHelper`, `TriConstraintStreamHelper`, `UniConstraintStreamHelper`

      public abstract class AbstractConstraintStreamHelper<Right,​JoinedStream,​Joiner,​Predicate>
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractConstraintStreamHelper()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected abstract JoinedStream` | `doJoin​(UniConstraintStream<Right> otherStream)` |
    `protected abstract JoinedStream` | `doJoin​(UniConstraintStream<Right> otherStream, Joiner joiner)` |
    `protected abstract JoinedStream` | `doJoin​(UniConstraintStream<Right> otherStream, Joiner... joiners)` |
    `protected abstract Predicate` | `extractPredicate​(Joiner joiner)` |
    `protected abstract JoinedStream` | `filter​(JoinedStream stream, Predicate predicate)` |
    `protected abstract boolean` | `isFilteringJoiner​(Joiner joiner)` |
    `JoinedStream` | `join​(UniConstraintStream<Right> otherStream, Joiner... joiners)` | Converts a set of joiners into a single composite joiner, optionally followed by some filters.
    `protected abstract Joiner` | `mergeJoiners​(Joiner... joiners)` |
    `protected abstract Predicate` | `mergePredicates​(Predicate predicate1, Predicate predicate2)` |

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

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

- - ### Constructor Detail

    - #### AbstractConstraintStreamHelper

          public AbstractConstraintStreamHelper()

  - ### Method Detail

    - #### doJoin

          protected abstract JoinedStream doJoin​(UniConstraintStream<Right> otherStream)

    - #### doJoin

          protected abstract JoinedStream doJoin​(UniConstraintStream<Right> otherStream,
                                                 Joiner joiner)

    - #### doJoin

          protected abstract JoinedStream doJoin​(UniConstraintStream<Right> otherStream,
                                                 Joiner... joiners)

    - #### filter

          protected abstract JoinedStream filter​(JoinedStream stream,
                                                 Predicate predicate)

    - #### mergeJoiners

          protected abstract Joiner mergeJoiners​(Joiner... joiners)

    - #### isFilteringJoiner

          protected abstract boolean isFilteringJoiner​(Joiner joiner)

    - #### extractPredicate

          protected abstract Predicate extractPredicate​(Joiner joiner)

    - #### mergePredicates

          protected abstract Predicate mergePredicates​(Predicate predicate1,
                                                       Predicate predicate2)

    - #### join

          public final JoinedStream join​(UniConstraintStream<Right> otherStream,
                                         Joiner... joiners)

      Converts a set of joiners into a single composite joiner, optionally followed by some filters. Ensures that the joiners are properly ordered filters-last.
      Parameters:
        `otherStream` - never null
        `joiners` - never null
      Returns:
        never null, stream with all the joiners applied