Drools Planner distribution 6.0.0-SNAPSHOT

org.drools.planner.core.score.buildin.hardsoft
Class HardSoftScoreHolder

java.lang.Object
  extended by org.drools.planner.core.score.holder.AbstractScoreHolder
      extended by org.drools.planner.core.score.buildin.hardsoft.HardSoftScoreHolder
All Implemented Interfaces:
Serializable, ScoreHolder

public class HardSoftScoreHolder
extends AbstractScoreHolder

See Also:
Serialized Form

Field Summary
protected  int hardScore
           
protected  int softScore
           
 
Constructor Summary
HardSoftScoreHolder()
           
 
Method Summary
 void addHardConstraintMatch(org.kie.runtime.rule.RuleContext kcontext, int weight)
           
 void addSoftConstraintMatch(org.kie.runtime.rule.RuleContext kcontext, int weight)
           
 Score extractScore()
          Extracts the Score, calculated by the WorkingMemory for DroolsScoreDirector.
 int getHardScore()
           
 int getSoftScore()
           
 void setHardScore(int hardScore)
           
 void setSoftScore(int softScore)
           
 
Methods inherited from class org.drools.planner.core.score.holder.AbstractScoreHolder
registerUndoListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hardScore

protected int hardScore

softScore

protected int softScore
Constructor Detail

HardSoftScoreHolder

public HardSoftScoreHolder()
Method Detail

getHardScore

public int getHardScore()

setHardScore

public void setHardScore(int hardScore)

getSoftScore

public int getSoftScore()

setSoftScore

public void setSoftScore(int softScore)

addHardConstraintMatch

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

addSoftConstraintMatch

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

extractScore

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

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

Returns:
never null, the Score of the working Solution

Drools Planner distribution 6.0.0-SNAPSHOT

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