Interface IBendableScore<Score_ extends IBendableScore<Score_>>
- Type Parameters:
Score_- the actual score type to allow addition, subtraction and other arithmetic
- All Superinterfaces:
Comparable<Score_>,Score<Score_>,Serializable
- All Known Implementing Classes:
AbstractBendableScore,BendableBigDecimalScore,BendableLongScore,BendableScore
@NullMarked
public interface IBendableScore<Score_ extends IBendableScore<Score_>>
extends Score<Score_>, Serializable
Bendable score is a
Score whose hardLevelsSize() and softLevelsSize()
are only known at runtime.
Interfaces in Timefold are usually not prefixed with "I".
However, the conflict in name with its implementation (BendableScore) made this necessary.
All the other options were considered worse, some even harmful.
This is a minor issue, as users will access the implementation and not the interface anyway.
-
Method Summary
Modifier and TypeMethodDescriptiondefault intDeprecated, for removal: This API element is subject to removal in a future version.default intDeprecated, for removal: This API element is subject to removal in a future version.UselevelsSize()instead.default intDeprecated, for removal: This API element is subject to removal in a future version.UsesoftLevelsSize()instead.intThe sum of this andsoftLevelsSize()equalslevelsSize().default intintThe sum ofhardLevelsSize()and this equalslevelsSize().Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface ai.timefold.solver.core.api.score.Score
abs, add, divide, getInitScore, initScore, isFeasible, isSolutionInitialized, isZero, multiply, negate, power, subtract, toLevelDoubles, toLevelNumbers, toShortString, withInitScore, zero
-
Method Details
-
hardLevelsSize
int hardLevelsSize()The sum of this andsoftLevelsSize()equalslevelsSize().- Returns:
>= 0and<levelsSize()
-
getHardLevelsSize
Deprecated, for removal: This API element is subject to removal in a future version.UsehardLevelsSize()instead.As defined byhardLevelsSize(). -
softLevelsSize
int softLevelsSize()The sum ofhardLevelsSize()and this equalslevelsSize().- Returns:
>= 0and<levelsSize()
-
getSoftLevelsSize
Deprecated, for removal: This API element is subject to removal in a future version.UsesoftLevelsSize()instead.As defined bysoftLevelsSize(). -
levelsSize
default int levelsSize()- Returns:
hardLevelsSize()+softLevelsSize()
-
getLevelsSize
Deprecated, for removal: This API element is subject to removal in a future version.UselevelsSize()instead.As defined bylevelsSize().
-
hardLevelsSize()instead.