org.drools.planner.core.score.comparator
Class FlatteningHardAndSoftScoreComparator

java.lang.Object
  extended by org.drools.planner.core.score.comparator.FlatteningHardAndSoftScoreComparator
All Implemented Interfaces:
Serializable, Comparator<Score>

public class FlatteningHardAndSoftScoreComparator
extends Object
implements Comparator<Score>, Serializable

Compares 2 HardAndSoftScore based on the calculation the hard multiplied by a weight to the soft.

See Also:
Serialized Form

Constructor Summary
FlatteningHardAndSoftScoreComparator(int hardWeight)
           
 
Method Summary
 int compare(Score s1, Score s2)
           
 int getHardWeight()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

FlatteningHardAndSoftScoreComparator

public FlatteningHardAndSoftScoreComparator(int hardWeight)
Method Detail

getHardWeight

public int getHardWeight()

compare

public int compare(Score s1,
                   Score s2)
Specified by:
compare in interface Comparator<Score>


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