org.optaplanner.core.api.score
Class AbstractScore<S extends Score>
java.lang.Object
org.optaplanner.core.api.score.AbstractScore<S>
- All Implemented Interfaces:
- Serializable, Comparable<S>, Score<S>
- Direct Known Subclasses:
- BendableScore, HardMediumSoftLongScore, HardMediumSoftScore, HardSoftBigDecimalScore, HardSoftDoubleScore, HardSoftLongScore, HardSoftScore, SimpleBigDecimalScore, SimpleDoubleScore, SimpleLongScore, SimpleScore
public abstract class AbstractScore<S extends Score>
- extends Object
- implements Score<S>, Serializable
Abstract superclass for Score
.
Subclasses must be immutable.
- See Also:
Score
,
HardSoftScore
,
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractScore
public AbstractScore()
parseLevelStrings
protected static String[] parseLevelStrings(String scoreString,
int levelsSize)
parseLevelStrings
protected static String[] parseLevelStrings(String scoreString,
String... levelSuffixes)
buildScorePattern
protected static String buildScorePattern(int levelsSize)
buildScorePattern
protected static String buildScorePattern(String... levelSuffixes)
isCompatibleArithmeticArgument
public boolean isCompatibleArithmeticArgument(Score otherScore)
- Specified by:
isCompatibleArithmeticArgument
in interface Score<S extends Score>
- Parameters:
otherScore
- never null
- Returns:
- true if the otherScore is accepted as a parameter of
Score.add(Score)
, Score.subtract(Score)
and Comparable.compareTo(Object)
.
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.