Package org.optaplanner.core.impl.score
Class ScoreUtil
java.lang.Object
org.optaplanner.core.impl.score.ScoreUtil
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <Score_ extends IBendableScore<Score_>>
StringbuildBendableShortString
(IBendableScore<Score_> score, Predicate<Number> notZero) static String
buildScorePattern
(boolean bendable, String... levelSuffixes) buildShortString
(Score<Score_> score, Predicate<Number> notZero, String... levelLabels) static String
getInitPrefix
(int initScore) static String[][]
parseBendableScoreTokens
(Class<? extends IBendableScore<?>> scoreClass, String scoreString) static int
parseInitScore
(Class<? extends Score<?>> scoreClass, String scoreString, String initScoreString) static BigDecimal
parseLevelAsBigDecimal
(Class<? extends Score<?>> scoreClass, String scoreString, String levelString) static int
parseLevelAsInt
(Class<? extends Score<?>> scoreClass, String scoreString, String levelString) static long
parseLevelAsLong
(Class<? extends Score<?>> scoreClass, String scoreString, String levelString) static String[]
parseScoreTokens
(Class<? extends Score<?>> scoreClass, String scoreString, String... levelSuffixes)
-
Field Details
-
INIT_LABEL
- See Also:
-
HARD_LABEL
- See Also:
-
MEDIUM_LABEL
- See Also:
-
SOFT_LABEL
- See Also:
-
LEVEL_SUFFIXES
-
-
Method Details
-
parseScoreTokens
-
parseInitScore
-
parseLevelAsInt
-
parseLevelAsLong
-
parseLevelAsBigDecimal
public static BigDecimal parseLevelAsBigDecimal(Class<? extends Score<?>> scoreClass, String scoreString, String levelString) -
buildScorePattern
-
getInitPrefix
-
buildShortString
-
parseBendableScoreTokens
public static String[][] parseBendableScoreTokens(Class<? extends IBendableScore<?>> scoreClass, String scoreString) -
buildBendableShortString
public static <Score_ extends IBendableScore<Score_>> String buildBendableShortString(IBendableScore<Score_> score, Predicate<Number> notZero)
-