Class AbstractScorer<Tuple_ extends Tuple>

java.lang.Object
org.optaplanner.constraint.streams.bavet.common.AbstractScorer<Tuple_>
All Implemented Interfaces:
TupleLifecycle<Tuple_>

public abstract class AbstractScorer<Tuple_ extends Tuple> extends Object implements TupleLifecycle<Tuple_>
  • Constructor Details

    • AbstractScorer

      protected AbstractScorer(String constraintPackage, String constraintName, org.optaplanner.core.api.score.Score<?> constraintWeight, int inputStoreIndex)
  • Method Details

    • insert

      public final void insert(Tuple_ tuple)
      Specified by:
      insert in interface TupleLifecycle<Tuple_ extends Tuple>
    • update

      public final void update(Tuple_ tuple)
      Specified by:
      update in interface TupleLifecycle<Tuple_ extends Tuple>
    • impact

      protected abstract org.optaplanner.constraint.streams.common.inliner.UndoScoreImpacter impact(Tuple_ tuple)
    • createExceptionOnImpact

      protected RuntimeException createExceptionOnImpact(Tuple_ tuple, Exception cause)
      Helps with debugging exceptions thrown by user code during impact calls.
      Parameters:
      tuple - never null
      cause - never null
      Returns:
      never null, exception to be thrown.
    • retract

      public final void retract(Tuple_ tuple)
      Specified by:
      retract in interface TupleLifecycle<Tuple_ extends Tuple>
    • toString

      public final String toString()
      Overrides:
      toString in class Object