S - the actual score typepublic abstract class AbstractScore<S extends Score> extends Object implements Score<S>, Serializable
Score.
Subclasses must be immutable.
Score,
HardSoftScore,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected static String |
INIT_LABEL |
protected int |
initScore |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractScore(int initScore) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertNoInitScore() |
protected static String |
buildScorePattern(boolean bendable,
String... levelSuffixes) |
protected String |
buildShortString(Predicate<Number> notZero,
String... levelLabels) |
protected String |
getInitPrefix() |
int |
getInitScore()
The init score is the negative of the number of uninitialized genuine planning variables.
|
boolean |
isSolutionInitialized()
Checks if the
PlanningSolution of this score was fully initialized when it was calculated. |
protected static int |
parseInitScore(Class<? extends Score> scoreClass,
String scoreString,
String initScoreString) |
protected static BigDecimal |
parseLevelAsBigDecimal(Class<? extends Score> scoreClass,
String scoreString,
String levelString) |
protected static double |
parseLevelAsDouble(Class<? extends Score> scoreClass,
String scoreString,
String levelString) |
protected static int |
parseLevelAsInt(Class<? extends Score> scoreClass,
String scoreString,
String levelString) |
protected static long |
parseLevelAsLong(Class<? extends Score> scoreClass,
String scoreString,
String levelString) |
protected static String[] |
parseScoreTokens(Class<? extends Score> scoreClass,
String scoreString,
String... levelSuffixes) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, divide, isCompatibleArithmeticArgument, multiply, negate, power, subtract, toInitializedScore, toLevelNumbers, toShortString, withInitScorecompareToprotected static final String INIT_LABEL
protected final int initScore
protected AbstractScore(int initScore)
initScore - see Score.getInitScore()protected static String[] parseScoreTokens(Class<? extends Score> scoreClass, String scoreString, String... levelSuffixes)
protected static int parseInitScore(Class<? extends Score> scoreClass, String scoreString, String initScoreString)
protected static int parseLevelAsInt(Class<? extends Score> scoreClass, String scoreString, String levelString)
protected static long parseLevelAsLong(Class<? extends Score> scoreClass, String scoreString, String levelString)
protected static double parseLevelAsDouble(Class<? extends Score> scoreClass, String scoreString, String levelString)
protected static BigDecimal parseLevelAsBigDecimal(Class<? extends Score> scoreClass, String scoreString, String levelString)
protected static String buildScorePattern(boolean bendable, String... levelSuffixes)
public int getInitScore()
ScorePlanningSolution is fully initialized
and the score's Object.toString() does not mention it.
During Comparable.compareTo(Object), it's even more important than the hard score:
if you don't want this behaviour, read about overconstrained planning in the reference manual.
getInitScore in interface Score<S extends Score>public boolean isSolutionInitialized()
ScorePlanningSolution of this score was fully initialized when it was calculated.isSolutionInitialized in interface Score<S extends Score>Score.getInitScore() is 0protected void assertNoInitScore()
protected String getInitPrefix()
Copyright © 2006–2017 JBoss by Red Hat. All rights reserved.