org.optaplanner.core.impl.score.stream.bavet

## Class BavetConstraint<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.bavet.BavetConstraint<Solution_>

- All Implemented Interfaces:
    Constraint

      public final class BavetConstraint<Solution_>
      extends Object
      implements Constraint

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BavetConstraint(BavetConstraintFactory<Solution_> constraintFactory, String constraintPackage, String constraintName, Function<Solution_,Score<?>> constraintWeightExtractor, boolean positive, List<BavetFromUniConstraintStream<Solution_,Object>> fromStreamList)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createNodes(BavetNodeBuildPolicy<Solution_> buildPolicy, Map<Class<?>,BavetFromUniNode<Object>> declaredClassToNodeMap, Score<?> constraintWeight)`
    `Score<?>` | `extractConstraintWeight(Solution_ workingSolution)`
    `BavetConstraintFactory<Solution_>` | `getConstraintFactory()` The `ConstraintFactory` that build this.
    `String` | `getConstraintName()` The constraint name.
    `String` | `getConstraintPackage()` The constraint package is the namespace of the constraint.

    - ### 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.Constraint

      `getConstraintId`

- - ### Constructor Detail

    - #### BavetConstraint

          public BavetConstraint(BavetConstraintFactory<Solution_> constraintFactory,
                                 String constraintPackage,
                                 String constraintName,
                                 Function<Solution_,Score<?>> constraintWeightExtractor,
                                 boolean positive,
                                 List<BavetFromUniConstraintStream<Solution_,Object>> fromStreamList)

  - ### Method Detail

    - #### extractConstraintWeight

          public Score<?> extractConstraintWeight(Solution_ workingSolution)

    - #### createNodes

          public void createNodes(BavetNodeBuildPolicy<Solution_> buildPolicy,
                                  Map<Class<?>,BavetFromUniNode<Object>> declaredClassToNodeMap,
                                  Score<?> constraintWeight)

    - #### getConstraintFactory

          public BavetConstraintFactory<Solution_> getConstraintFactory()

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

    - #### getConstraintPackage

          public String getConstraintPackage()

      Description copied from interface: `Constraint`
      The constraint package is the namespace of the constraint.

      When using a `ConstraintConfiguration`, it is equal to the `ConstraintWeight.constraintPackage()`.

      Specified by:
        `getConstraintPackage` in interface `Constraint`
      Returns:
        never null

    - #### getConstraintName

          public String getConstraintName()

      Description copied from interface: `Constraint`
      The constraint name. It might not be unique, but `Constraint.getConstraintId()` is unique.

      When using a `ConstraintConfiguration`, it is equal to the `ConstraintWeight.value()`.

      Specified by:
        `getConstraintName` in interface `Constraint`
      Returns:
        never null

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