Drools Planner distribution 6.0.0-SNAPSHOT

org.drools.planner.core.score.buildin.hardsoftdouble
Class HardSoftDoubleScoreHolder

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

public class HardSoftDoubleScoreHolder
extends AbstractScoreHolder

See Also:
Serialized Form

Field Summary
protected  double hardScore
           
protected  double softScore
           
 
Constructor Summary
HardSoftDoubleScoreHolder()
           
 
Method Summary
 void addHardConstraintMatch(org.kie.runtime.rule.RuleContext kcontext, double weight)
           
 void addSoftConstraintMatch(org.kie.runtime.rule.RuleContext kcontext, double weight)
           
 Score extractScore()
          Extracts the Score, calculated by the WorkingMemory for DroolsScoreDirector.
 double getHardScore()
           
 double getSoftScore()
           
 void setHardScore(double hardScore)
           
 void setSoftScore(double 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 double hardScore

softScore

protected double softScore
Constructor Detail

HardSoftDoubleScoreHolder

public HardSoftDoubleScoreHolder()
Method Detail

getHardScore

public double getHardScore()

setHardScore

public void setHardScore(double hardScore)

getSoftScore

public double getSoftScore()

setSoftScore

public void setSoftScore(double softScore)

addHardConstraintMatch

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

addSoftConstraintMatch

public void addSoftConstraintMatch(org.kie.runtime.rule.RuleContext kcontext,
                                   double 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.