Package org.optaplanner.core.api.score
Class AbstractScore<Score_ extends AbstractScore<Score_>>
java.lang.Object
org.optaplanner.core.api.score.AbstractScore<Score_>
- Type Parameters:
- Score_- the actual score type
- All Implemented Interfaces:
- Serializable,- Comparable<Score_>,- Score<Score_>
- Direct Known Subclasses:
- AbstractBendableScore
@Deprecated(forRemoval=true)
public abstract class AbstractScore<Score_ extends AbstractScore<Score_>>
extends Object
implements Score<Score_>, Serializable
Deprecated, for removal: This API element is subject to removal in a future version.
Abstract superclass for 
Score.
 Subclasses must be immutable.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final StringDeprecated, for removal: This API element is subject to removal in a future version.protected final intDeprecated, for removal: This API element is subject to removal in a future version.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractScore(int initScore) Deprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptionprotected static StringbuildScorePattern(boolean bendable, String... levelSuffixes) Deprecated, for removal: This API element is subject to removal in a future version.protected StringbuildShortString(Predicate<Number> notZero, String... levelLabels) Deprecated, for removal: This API element is subject to removal in a future version.protected StringDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.The init score is the negative of the number of uninitialized genuine planning variables.protected static intparseInitScore(Class<? extends AbstractScore<?>> scoreClass, String scoreString, String initScoreString) Deprecated, for removal: This API element is subject to removal in a future version.protected static BigDecimalparseLevelAsBigDecimal(Class<? extends AbstractScore<?>> scoreClass, String scoreString, String levelString) Deprecated, for removal: This API element is subject to removal in a future version.protected static intparseLevelAsInt(Class<? extends AbstractScore<?>> scoreClass, String scoreString, String levelString) Deprecated, for removal: This API element is subject to removal in a future version.protected static longparseLevelAsLong(Class<? extends AbstractScore<?>> scoreClass, String scoreString, String levelString) Deprecated, for removal: This API element is subject to removal in a future version.protected static String[]parseScoreTokens(Class<? extends AbstractScore<?>> scoreClass, String scoreString, String... levelSuffixes) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.ComparablecompareToMethods inherited from interface org.optaplanner.core.api.score.Scoreabs, add, divide, getInitScore, isFeasible, isSolutionInitialized, isZero, multiply, negate, power, subtract, toLevelDoubles, toLevelNumbers, toShortString, withInitScore, zero
- 
Field Details- 
INIT_LABELDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
 
- 
initScoreprotected final int initScoreDeprecated, for removal: This API element is subject to removal in a future version.
 
- 
- 
Constructor Details- 
AbstractScoreprotected AbstractScore(int initScore) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
- initScore- see- Score.initScore()
 
 
- 
- 
Method Details- 
parseScoreTokensprotected static String[] parseScoreTokens(Class<? extends AbstractScore<?>> scoreClass, String scoreString, String... levelSuffixes) Deprecated, for removal: This API element is subject to removal in a future version.
- 
parseInitScoreprotected static int parseInitScore(Class<? extends AbstractScore<?>> scoreClass, String scoreString, String initScoreString) Deprecated, for removal: This API element is subject to removal in a future version.
- 
parseLevelAsIntprotected static int parseLevelAsInt(Class<? extends AbstractScore<?>> scoreClass, String scoreString, String levelString) Deprecated, for removal: This API element is subject to removal in a future version.
- 
parseLevelAsLongprotected static long parseLevelAsLong(Class<? extends AbstractScore<?>> scoreClass, String scoreString, String levelString) Deprecated, for removal: This API element is subject to removal in a future version.
- 
parseLevelAsBigDecimalprotected static BigDecimal parseLevelAsBigDecimal(Class<? extends AbstractScore<?>> scoreClass, String scoreString, String levelString) Deprecated, for removal: This API element is subject to removal in a future version.
- 
buildScorePatternDeprecated, for removal: This API element is subject to removal in a future version.
- 
initScorepublic int initScore()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ScoreThe init score is the negative of the number of uninitialized genuine planning variables. If it's 0 (which it usually is), thePlanningSolutionis fully initialized and the score'sObject.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.- Specified by:
- initScorein interface- Score<Score_ extends AbstractScore<Score_>>
- Returns:
- higher is better, always negative (except in statistical calculations), 0 if all planning variables are initialized
 
- 
getInitPrefixDeprecated, for removal: This API element is subject to removal in a future version.
- 
buildShortStringDeprecated, for removal: This API element is subject to removal in a future version.
 
- 
Scoreinstead.