OptaPlanner core 6.0.1.Final

org.optaplanner.core.api.score.buildin.hardsoftbigdecimal
Class HardSoftBigDecimalScoreHolder

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

public class HardSoftBigDecimalScoreHolder
extends AbstractScoreHolder

See Also:
HardSoftBigDecimalScore, Serialized Form

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

softScore

protected BigDecimal softScore
Constructor Detail

HardSoftBigDecimalScoreHolder

public HardSoftBigDecimalScoreHolder(boolean constraintMatchEnabled)
Method Detail

getHardScore

public BigDecimal getHardScore()

setHardScore

@Deprecated
public void setHardScore(BigDecimal hardScore)
Deprecated. 


getSoftScore

public BigDecimal getSoftScore()

setSoftScore

@Deprecated
public void setSoftScore(BigDecimal softScore)
Deprecated. 


addHardConstraintMatch

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

addSoftConstraintMatch

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

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