Package org.optaplanner.core.impl.score.inliner

## Interface WeightedScoreImpacter

-     public interface WeightedScoreImpacter

  There are several valid ways how an impacter could be called from a constraint stream:
  - `.penalize(..., (int) 1)`
  - `.penalizeLong(..., (int) 1)`
  - `.penalizeLong(..., (long) 1)`
  - `.penalizeBigDecimal(..., (int) 1)`
  - `.penalizeBigDecimal(..., (long) 1)`
  - `.penalizeBigDecimal(..., BigDecimal.ONE)`
  - Plus reward variants of the above.
  An implementation of this interface can throw an `UnsupportedOperationException` for the method types it doesn't support. The CS API guarantees no types are mixed. For example, a `BigDecimal` parameter method won't be called on an instance built with an `WeightedScoreImpacter.IntImpactFunction`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static interface` | `WeightedScoreImpacter.BigDecimalImpactFunction` |
    `static interface` | `WeightedScoreImpacter.IntImpactFunction` |
    `static interface` | `WeightedScoreImpacter.LongImpactFunction` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `UndoScoreImpacter` | `impactScore​(int matchWeight, JustificationsSupplier justificationsSupplier)` |
    `UndoScoreImpacter` | `impactScore​(long matchWeight, JustificationsSupplier justificationsSupplier)` |
    `UndoScoreImpacter` | `impactScore​(BigDecimal matchWeight, JustificationsSupplier justificationsSupplier)` |
    `static WeightedScoreImpacter` | `of​(WeightedScoreImpacter.BigDecimalImpactFunction impactFunction)` |
    `static WeightedScoreImpacter` | `of​(WeightedScoreImpacter.IntImpactFunction impactFunction)` |
    `static WeightedScoreImpacter` | `of​(WeightedScoreImpacter.LongImpactFunction impactFunction)` |

- - ### Method Detail

    - #### of

          static WeightedScoreImpacter of​(WeightedScoreImpacter.IntImpactFunction impactFunction)

    - #### of

          static WeightedScoreImpacter of​(WeightedScoreImpacter.LongImpactFunction impactFunction)

    - #### of

          static WeightedScoreImpacter of​(WeightedScoreImpacter.BigDecimalImpactFunction impactFunction)

    - #### impactScore

          UndoScoreImpacter impactScore​(int matchWeight,
                                        JustificationsSupplier justificationsSupplier)

      Parameters:
        `matchWeight` - never null
        `justificationsSupplier` - never null
      Returns:
        never null

    - #### impactScore

          UndoScoreImpacter impactScore​(long matchWeight,
                                        JustificationsSupplier justificationsSupplier)

      Parameters:
        `matchWeight` - never null
        `justificationsSupplier` - never null
      Returns:
        never null

    - #### impactScore

          UndoScoreImpacter impactScore​(BigDecimal matchWeight,
                                        JustificationsSupplier justificationsSupplier)

      Parameters:
        `matchWeight` - never null
        `justificationsSupplier` - never null
      Returns:
        never null