OptaPlanner core 6.0.0.CR2

org.optaplanner.core.api.score.buildin.simple
Class SimpleScoreHolder

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

public class SimpleScoreHolder
extends AbstractScoreHolder

See Also:
SimpleScore, Serialized Form

Field Summary
protected  int score
           
 
Fields inherited from class org.optaplanner.core.api.score.holder.AbstractScoreHolder
constraintMatchEnabled, constraintMatchTotalMap
 
Constructor Summary
SimpleScoreHolder(boolean constraintMatchEnabled)
           
 
Method Summary
 void addConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int weight)
           
 Score extractScore()
          Extracts the Score, calculated by the KieSession for DroolsScoreDirector.
 int getScore()
           
 void setScore(int score)
          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
 

Field Detail

score

protected int score
Constructor Detail

SimpleScoreHolder

public SimpleScoreHolder(boolean constraintMatchEnabled)
Method Detail

getScore

public int getScore()

setScore

@Deprecated
public void setScore(int score)
Deprecated. 


addConstraintMatch

public void addConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
                               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.0.0.CR2

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