Package org.optaplanner.core.api.score
Class AbstractBendableScore<Score_ extends AbstractBendableScore<Score_>>
- java.lang.Object
- 
- org.optaplanner.core.api.score.AbstractScore<Score_>
- 
- org.optaplanner.core.api.score.AbstractBendableScore<Score_>
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<Score_>,- Score<Score_>
 - Direct Known Subclasses:
- BendableBigDecimalScore,- BendableLongScore,- BendableScore
 
 public abstract class AbstractBendableScore<Score_ extends AbstractBendableScore<Score_>> extends AbstractScore<Score_> Abstract superclass for bendableScoretypes.Subclasses must be immutable. - See Also:
- BendableScore, Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static StringHARD_LABELprotected static String[]LEVEL_SUFFIXESprotected static StringSOFT_LABEL- 
Fields inherited from class org.optaplanner.core.api.score.AbstractScoreINIT_LABEL, initScore
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractBendableScore(int initScore)
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringbuildBendableShortString(Predicate<Number> notZero)abstract intgetHardLevelsSize()The sum of this andgetSoftLevelsSize()equalsgetLevelsSize().abstract intgetLevelsSize()abstract intgetSoftLevelsSize()The sum ofgetHardLevelsSize()and this equalsgetLevelsSize().protected static String[][]parseBendableScoreTokens(Class<? extends AbstractBendableScore<?>> scoreClass, String scoreString)- 
Methods inherited from class org.optaplanner.core.api.score.AbstractScorebuildScorePattern, buildShortString, getInitPrefix, getInitScore, isSolutionInitialized, parseInitScore, parseLevelAsBigDecimal, parseLevelAsInt, parseLevelAsLong, parseScoreTokens
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.lang.ComparablecompareTo
 - 
Methods inherited from interface org.optaplanner.core.api.score.Scoreadd, divide, isFeasible, multiply, negate, power, subtract, toLevelNumbers, toShortString, withInitScore
 
- 
 
- 
- 
- 
Field Detail- 
HARD_LABELprotected static final String HARD_LABEL - See Also:
- Constant Field Values
 
 - 
SOFT_LABELprotected static final String SOFT_LABEL - See Also:
- Constant Field Values
 
 - 
LEVEL_SUFFIXESprotected static final String[] LEVEL_SUFFIXES 
 
- 
 - 
Constructor Detail- 
AbstractBendableScoreprotected AbstractBendableScore(int initScore) - Parameters:
- initScore- see- Score.getInitScore()
 
 
- 
 - 
Method Detail- 
parseBendableScoreTokensprotected static String[][] parseBendableScoreTokens(Class<? extends AbstractBendableScore<?>> scoreClass, String scoreString) 
 - 
getHardLevelsSizepublic abstract int getHardLevelsSize() The sum of this andgetSoftLevelsSize()equalsgetLevelsSize().- Returns:
- >= 0and- <- getLevelsSize()
 
 - 
getSoftLevelsSizepublic abstract int getSoftLevelsSize() The sum ofgetHardLevelsSize()and this equalsgetLevelsSize().- Returns:
- >= 0and- <- getLevelsSize()
 
 - 
getLevelsSizepublic abstract int getLevelsSize() - Returns:
- getHardLevelsSize()+- getSoftLevelsSize()
 
 
- 
 
-