OptaPlanner distribution 6.2.1-SNAPSHOT

org.optaplanner.core.api.score.buildin.bendablelong
Class BendableLongScoreHolder

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

public class BendableLongScoreHolder
extends AbstractScoreHolder

See Also:
BendableLongScore, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.optaplanner.core.api.score.holder.AbstractScoreHolder
AbstractScoreHolder.BigDecimalConstraintUndoListener, AbstractScoreHolder.DoubleConstraintUndoListener, AbstractScoreHolder.IntConstraintUndoListener, AbstractScoreHolder.LongConstraintUndoListener
 
Field Summary
 
Fields inherited from class org.optaplanner.core.api.score.holder.AbstractScoreHolder
constraintMatchEnabled, constraintMatchTotalMap
 
Constructor Summary
BendableLongScoreHolder(boolean constraintMatchEnabled, int hardLevelsSize, int softLevelsSize)
           
 
Method Summary
 void addHardConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int hardLevel, long weight)
           
 void addSoftConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int softLevel, long weight)
           
 Score extractScore()
          Extracts the Score, calculated by the KieSession for DroolsScoreDirector.
 int getHardLevelsSize()
           
 long getHardScore(int hardLevel)
           
 int getSoftLevelsSize()
           
 long getSoftScore(int softLevel)
           
 void setHardScore(int hardLevel, long hardScore)
          Deprecated. 
 void setSoftScore(int softLevel, long 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
 

Constructor Detail

BendableLongScoreHolder

public BendableLongScoreHolder(boolean constraintMatchEnabled,
                               int hardLevelsSize,
                               int softLevelsSize)
Method Detail

getHardLevelsSize

public int getHardLevelsSize()

getHardScore

public long getHardScore(int hardLevel)

setHardScore

@Deprecated
public void setHardScore(int hardLevel,
                                    long hardScore)
Deprecated. 


getSoftLevelsSize

public int getSoftLevelsSize()

getSoftScore

public long getSoftScore(int softLevel)

setSoftScore

@Deprecated
public void setSoftScore(int softLevel,
                                    long softScore)
Deprecated. 


addHardConstraintMatch

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

addSoftConstraintMatch

public void addSoftConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
                                   int softLevel,
                                   long 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 distribution 6.2.1-SNAPSHOT

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