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

## Class DroolsScoringUniConstraintStream<Solution_,​A>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.common.AbstractConstraintStream<Solution_>
  - - org.optaplanner.core.impl.score.stream.drools.common.DroolsAbstractConstraintStream<Solution_>
    - - org.optaplanner.core.impl.score.stream.drools.uni.DroolsAbstractUniConstraintStream<Solution_,​A>
      - - org.optaplanner.core.impl.score.stream.drools.uni.DroolsScoringUniConstraintStream<Solution_,​A>

- All Implemented Interfaces:
    `ConstraintStream`, `UniConstraintStream<A>`, `InnerUniConstraintStream<A>`

      public final class DroolsScoringUniConstraintStream<Solution_,​A>
      extends DroolsAbstractUniConstraintStream<Solution_,​A>

- - ### Field Summary

    - ### Fields inherited from class org.optaplanner.core.impl.score.stream.drools.common.DroolsAbstractConstraintStream

      `constraintFactory`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DroolsScoringUniConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractUniConstraintStream<Solution_,​A> parent)` |
    `DroolsScoringUniConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractUniConstraintStream<Solution_,​A> parent, Function<A,​BigDecimal> bigDecimalMatchWeigher)` |
    `DroolsScoringUniConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractUniConstraintStream<Solution_,​A> parent, ToIntFunction<A> intMatchWeigher)` |
    `DroolsScoringUniConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractUniConstraintStream<Solution_,​A> parent, ToLongFunction<A> longMatchWeigher)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `List<org.drools.model.RuleItemBuilder<?>>` | `createRuleItemBuilders​(DroolsConstraint<?> constraint, org.drools.model.Global<? extends AbstractScoreHolder<?>> scoreHolderGlobal)` | Assemble elements of the rule that will process this stream and turn it into a constraint match.
    `DroolsUniCondition<A,​?>` | `getCondition()` |
    `Class[]` | `getExpectedJustificationTypes()` | As defined by `DroolsRuleStructure.getExpectedJustificationTypes()`.
    `List<DroolsFromUniConstraintStream<Solution_,​Object>>` | `getFromStreamList()` |
    `String` | `toString()` |

    - ### Methods inherited from class org.optaplanner.core.impl.score.stream.drools.uni.DroolsAbstractUniConstraintStream

      `filter, getCardinality, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, ifExists, ifNotExists, impactScore, impactScore, impactScoreBigDecimal, impactScoreConfigurable, impactScoreConfigurable, impactScoreConfigurableBigDecimal, impactScoreConfigurableLong, impactScoreLong, join`

    - ### Methods inherited from class org.optaplanner.core.impl.score.stream.drools.common.DroolsAbstractConstraintStream

      `addChildStream, buildConstraint, buildConstraintConfigurable, getChildStreams, getConstraintFactory`

    - ### Methods inherited from class org.optaplanner.core.impl.score.stream.common.AbstractConstraintStream

      `buildConstraintWeightExtractor, buildConstraintWeightExtractor, impact, penalize, penalizeConfigurable, reward, rewardConfigurable`

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

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

    - ### Methods inherited from interface org.optaplanner.core.api.score.stream.ConstraintStream

      `getConstraintFactory, impact, impact, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable`

    - ### Methods inherited from interface org.optaplanner.core.impl.score.stream.uni.InnerUniConstraintStream

      `impact, impactBigDecimal, impactConfigurable, impactConfigurableBigDecimal, impactConfigurableLong, impactLong, penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong`

    - ### Methods inherited from interface org.optaplanner.core.api.score.stream.uni.UniConstraintStream

      `ifExists, ifExists, ifExists, ifExists, ifExistsOther, ifExistsOther, ifExistsOther, ifExistsOther, ifExistsOther, ifExistsOther, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExistsOther, ifNotExistsOther, ifNotExistsOther, ifNotExistsOther, ifNotExistsOther, ifNotExistsOther, impact, impactBigDecimal, impactConfigurable, impactConfigurableBigDecimal, impactConfigurableLong, impactLong, join, join, join, join, join, join, join, penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong`

- - ### Constructor Detail

    - #### DroolsScoringUniConstraintStream

          public DroolsScoringUniConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory,
                                                  DroolsAbstractUniConstraintStream<Solution_,​A> parent)

    - #### DroolsScoringUniConstraintStream

          public DroolsScoringUniConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory,
                                                  DroolsAbstractUniConstraintStream<Solution_,​A> parent,
                                                  ToIntFunction<A> intMatchWeigher)

    - #### DroolsScoringUniConstraintStream

          public DroolsScoringUniConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory,
                                                  DroolsAbstractUniConstraintStream<Solution_,​A> parent,
                                                  ToLongFunction<A> longMatchWeigher)

    - #### DroolsScoringUniConstraintStream

          public DroolsScoringUniConstraintStream​(DroolsConstraintFactory<Solution_> constraintFactory,
                                                  DroolsAbstractUniConstraintStream<Solution_,​A> parent,
                                                  Function<A,​BigDecimal> bigDecimalMatchWeigher)

  - ### Method Detail

    - #### getFromStreamList

          public List<DroolsFromUniConstraintStream<Solution_,​Object>> getFromStreamList()

      Specified by:
        `getFromStreamList` in class `DroolsAbstractConstraintStream<Solution_>`

    - #### createRuleItemBuilders

          public List<org.drools.model.RuleItemBuilder<?>> createRuleItemBuilders​(DroolsConstraint<?> constraint,
                                                                                  org.drools.model.Global<? extends AbstractScoreHolder<?>> scoreHolderGlobal)

      Description copied from class: `DroolsAbstractConstraintStream`
      Assemble elements of the rule that will process this stream and turn it into a constraint match. Will be ignored unless on a scoring stream such as `DroolsScoringUniConstraintStream`.
      Overrides:
        `createRuleItemBuilders` in class `DroolsAbstractConstraintStream<Solution_>`
      Parameters:
        `constraint` - constraint which is being scored
        `scoreHolderGlobal` - contains the score to be affected
      Returns:
        rule representing this constraint stream

    - #### getCondition

          public DroolsUniCondition<A,​?> getCondition()

      Specified by:
        `getCondition` in class `DroolsAbstractUniConstraintStream<Solution_,​A>`

    - #### getExpectedJustificationTypes

          public Class[] getExpectedJustificationTypes()

      Description copied from class: `DroolsAbstractConstraintStream`
      As defined by `DroolsRuleStructure.getExpectedJustificationTypes()`. May only be called on scoring streams.
      Overrides:
        `getExpectedJustificationTypes` in class `DroolsAbstractConstraintStream<Solution_>`
      Returns:
        never null, never empty

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`