OptaPlanner core 6.0.0.Beta3

org.optaplanner.core.api.score.buildin.hardsoftdouble
Class HardSoftDoubleScoreHolder

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

public class HardSoftDoubleScoreHolder
extends AbstractScoreHolder

See Also:
HardSoftDoubleScore, Serialized Form

Field Summary
protected  double hardScore
           
protected  double softScore
           
 
Fields inherited from class org.optaplanner.core.api.score.holder.AbstractScoreHolder
constraintMatchEnabled, constraintMatchTotalMap
 
Constructor Summary
HardSoftDoubleScoreHolder(boolean constraintMatchEnabled)
           
 
Method Summary
 void addHardConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, double weight)
           
 void addSoftConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, double weight)
           
 Score extractScore()
          Extracts the Score, calculated by the KieSession for DroolsScoreDirector.
 double getHardScore()
           
 double getSoftScore()
           
 void setHardScore(double hardScore)
          Deprecated. 
 void setSoftScore(double 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
 

Field Detail

hardScore

protected double hardScore

softScore

protected double softScore
Constructor Detail

HardSoftDoubleScoreHolder

public HardSoftDoubleScoreHolder(boolean constraintMatchEnabled)
Method Detail

getHardScore

public double getHardScore()

setHardScore

@Deprecated
public void setHardScore(double hardScore)
Deprecated. 


getSoftScore

public double getSoftScore()

setSoftScore

@Deprecated
public void setSoftScore(double softScore)
Deprecated. 


addHardConstraintMatch

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

addSoftConstraintMatch

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

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