Class FlatteningHardSoftScoreComparator
- java.lang.Object
-
- org.optaplanner.core.impl.score.comparator.FlatteningHardSoftScoreComparator
-
- All Implemented Interfaces:
Comparator<Score>
public class FlatteningHardSoftScoreComparator extends Object implements Comparator<Score>
Compares 2HardSoftScore
s based on the calculation of the hard multiplied by a weight, summed with the soft.
-
-
Constructor Summary
Constructors Constructor Description FlatteningHardSoftScoreComparator(int hardWeight)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
getHardWeight
public int getHardWeight()
-
compare
public int compare(Score s1, Score s2)
- Specified by:
compare
in interfaceComparator<Score>
-
-