Record Class InitializingScoreTrend
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.score.trend.InitializingScoreTrend
Bounds the possible
Scores for a PlanningSolution as more and more variables are initialized
(while the already initialized variables don't change).- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInitializingScoreTrend(InitializingScoreTrendLevel[] trendLevels) Creates an instance of aInitializingScoreTrendrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic InitializingScoreTrendbuildUniformTrend(InitializingScoreTrendLevel trendLevel, int levelsSize) booleanIndicates whether some other object is "equal to" this one.intinthashCode()Returns a hash code value for this object.booleanbooleanisOnlyUp()static InitializingScoreTrendparseTrend(String initializingScoreTrendString, int levelsSize) toString()Returns a string representation of this record class.Returns the value of thetrendLevelsrecord component.
-
Constructor Details
-
InitializingScoreTrend
Creates an instance of aInitializingScoreTrendrecord class.- Parameters:
trendLevels- the value for thetrendLevelsrecord component
-
-
Method Details
-
parseTrend
public static InitializingScoreTrend parseTrend(String initializingScoreTrendString, int levelsSize) -
buildUniformTrend
public static InitializingScoreTrend buildUniformTrend(InitializingScoreTrendLevel trendLevel, int levelsSize) -
getLevelsSize
public int getLevelsSize() -
isOnlyUp
public boolean isOnlyUp() -
isOnlyDown
public boolean isOnlyDown() -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
trendLevels
Returns the value of thetrendLevelsrecord component.- Returns:
- the value of the
trendLevelsrecord component
-