OptaPlanner core 6.2.0.Beta1

org.optaplanner.core.api.score.buildin.bendable
Class BendableScoreHolder

java.lang.Object
  extended by org.optaplanner.core.api.score.holder.AbstractScoreHolder
      extended by org.optaplanner.core.api.score.buildin.bendable.BendableScoreHolder
All Implemented Interfaces:
Serializable, ScoreHolder

public class BendableScoreHolder
extends AbstractScoreHolder

See Also:
BendableScore, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.optaplanner.core.api.score.holder.AbstractScoreHolder
AbstractScoreHolder.BigDecimalConstraintUndoListener, AbstractScoreHolder.DoubleConstraintUndoListener, AbstractScoreHolder.IntConstraintUndoListener, AbstractScoreHolder.LongConstraintUndoListener
 
Field Summary
 
Fields inherited from class org.optaplanner.core.api.score.holder.AbstractScoreHolder
constraintMatchEnabled, constraintMatchTotalMap
 
Constructor Summary
BendableScoreHolder(boolean constraintMatchEnabled, int hardLevelsSize, int softLevelsSize)
           
 
Method Summary
 void addHardConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int hardLevel, int weight)
           
 void addSoftConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int softLevel, int weight)
           
 Score extractScore()
          Extracts the Score, calculated by the KieSession for DroolsScoreDirector.
 int getHardLevelsSize()
           
 int getHardScore(int hardLevel)
           
 int getSoftLevelsSize()
           
 int getSoftScore(int softLevel)
           
 void setHardScore(int hardLevel, int hardScore)
          Deprecated. 
 void setSoftScore(int softLevel, int softScore)
          Deprecated. 
 
Methods inherited from class org.optaplanner.core.api.score.holder.AbstractScoreHolder
getConstraintMatchTotals, isConstraintMatchEnabled, registerBigDecimalConstraintMatch, registerDoubleConstraintMatch, registerIntConstraintMatch, registerLongConstraintMatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BendableScoreHolder

public BendableScoreHolder(boolean constraintMatchEnabled,
                           int hardLevelsSize,
                           int softLevelsSize)
Method Detail

getHardLevelsSize

public int getHardLevelsSize()

getHardScore

public int getHardScore(int hardLevel)

setHardScore

@Deprecated
public void setHardScore(int hardLevel,
                                    int hardScore)
Deprecated. 


getSoftLevelsSize

public int getSoftLevelsSize()

getSoftScore

public int getSoftScore(int softLevel)

setSoftScore

@Deprecated
public void setSoftScore(int softLevel,
                                    int softScore)
Deprecated. 


addHardConstraintMatch

public void addHardConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
                                   int hardLevel,
                                   int weight)

addSoftConstraintMatch

public void addSoftConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
                                   int softLevel,
                                   int weight)

extractScore

public Score extractScore()
Description copied from interface: ScoreHolder
Extracts the Score, calculated by the KieSession for DroolsScoreDirector.

Should not be called directly, use ScoreDirector.calculateScore() instead.

Returns:
never null, the Score of the working Solution

OptaPlanner core 6.2.0.Beta1

Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.