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

## Class AbstractConstraintStream<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.common.AbstractConstraintStream<Solution_>

- All Implemented Interfaces:
    ConstraintStream
  Direct Known Subclasses:
    BavetAbstractConstraintStream, DroolsAbstractConstraintStream

      public abstract class AbstractConstraintStream<Solution_>
      extends Object
      implements ConstraintStream

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractConstraintStream()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Function<Solution_,Score<?>>` | `buildConstraintWeightExtractor(String constraintPackage, String constraintName)`
    `protected Function<Solution_,Score<?>>` | `buildConstraintWeightExtractor(String constraintPackage, String constraintName, Score<?> constraintWeight)`
    `abstract InnerConstraintFactory<Solution_>` | `getConstraintFactory()` The `ConstraintFactory` that build this.
    `Constraint` | `impact(String constraintPackage, String constraintName, Score<?> constraintWeight)` As defined by `ConstraintStream.impact(String, Score)`.
    `protected abstract Constraint` | `impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, ScoreImpactType impactType)`
    `protected abstract Constraint` | `impactScoreConfigurable(String constraintPackage, String constraintName, ScoreImpactType impactType)`
    `Constraint` | `penalize(String constraintPackage, String constraintName, Score<?> constraintWeight)` As defined by `ConstraintStream.penalize(String, Score)`.
    `Constraint` | `penalizeConfigurable(String constraintPackage, String constraintName)` As defined by `ConstraintStream.penalizeConfigurable(String)`.
    `Constraint` | `reward(String constraintPackage, String constraintName, Score<?> constraintWeight)` As defined by `ConstraintStream.reward(String, Score)`.
    `Constraint` | `rewardConfigurable(String constraintPackage, String constraintName)` As defined by `ConstraintStream.rewardConfigurable(String)`.

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

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

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

      `impact, penalize, penalizeConfigurable, reward, rewardConfigurable`

- - ### Constructor Detail

    - #### AbstractConstraintStream

          public AbstractConstraintStream()

  - ### Method Detail

    - #### buildConstraintWeightExtractor

          protected Function<Solution_,Score<?>> buildConstraintWeightExtractor(String constraintPackage,
                                                                                String constraintName)

    - #### buildConstraintWeightExtractor

          protected Function<Solution_,Score<?>> buildConstraintWeightExtractor(String constraintPackage,
                                                                                String constraintName,
                                                                                Score<?> constraintWeight)

    - #### getConstraintFactory

          public abstract InnerConstraintFactory<Solution_> getConstraintFactory()

      Description copied from interface: `ConstraintStream`
      The `ConstraintFactory` that build this.
      Specified by:
        `getConstraintFactory` in interface `ConstraintStream`
      Returns:
        never null

    - #### penalize

          public final Constraint penalize(String constraintPackage,
                                           String constraintName,
                                           Score<?> constraintWeight)

      Description copied from interface: `ConstraintStream`
      As defined by `ConstraintStream.penalize(String, Score)`.
      Specified by:
        `penalize` in interface `ConstraintStream`
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
      Returns:
        never null

    - #### penalizeConfigurable

          public final Constraint penalizeConfigurable(String constraintPackage,
                                                       String constraintName)

      Description copied from interface: `ConstraintStream`
      As defined by `ConstraintStream.penalizeConfigurable(String)`.
      Specified by:
        `penalizeConfigurable` in interface `ConstraintStream`
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
      Returns:
        never null

    - #### reward

          public final Constraint reward(String constraintPackage,
                                         String constraintName,
                                         Score<?> constraintWeight)

      Description copied from interface: `ConstraintStream`
      As defined by `ConstraintStream.reward(String, Score)`.
      Specified by:
        `reward` in interface `ConstraintStream`
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
      Returns:
        never null

    - #### rewardConfigurable

          public final Constraint rewardConfigurable(String constraintPackage,
                                                     String constraintName)

      Description copied from interface: `ConstraintStream`
      As defined by `ConstraintStream.rewardConfigurable(String)`.
      Specified by:
        `rewardConfigurable` in interface `ConstraintStream`
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
      Returns:
        never null

    - #### impact

          public final Constraint impact(String constraintPackage,
                                         String constraintName,
                                         Score<?> constraintWeight)

      Description copied from interface: `ConstraintStream`
      As defined by `ConstraintStream.impact(String, Score)`.
      Specified by:
        `impact` in interface `ConstraintStream`
      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
        `constraintWeight` - never null
      Returns:
        never null

    - #### impactScore

          protected abstract Constraint impactScore(String constraintPackage,
                                                    String constraintName,
                                                    Score<?> constraintWeight,
                                                    ScoreImpactType impactType)

    - #### impactScoreConfigurable

          protected abstract Constraint impactScoreConfigurable(String constraintPackage,
                                                                String constraintName,
                                                                ScoreImpactType impactType)

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.