Record Class InnerScore<Score_ extends Score<Score_>>
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.score.director.InnerScore<Score_>
- All Implemented Interfaces:
Comparable<InnerScore<Score_>>
@NullMarked
public record InnerScore<Score_ extends Score<Score_>>(Score_ extends Score<Score_> raw, int unassignedCount)
extends Record
implements Comparable<InnerScore<Score_>>
Carries information on if the
PlanningSolution of this score was fully initialized when it was calculated.
This only works for solutions where:
basic variablesare used, andunassigningis not allowed.list variablesare used, andunassigned valuesare not allowed.
unassignedCount is always zero.-
Constructor Summary
ConstructorsConstructorDescriptionInnerScore(Score_ raw, int unassignedCount) Creates an instance of aInnerScorerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(InnerScore<Score_> other) final booleanIndicates whether some other object is "equal to" this one.static <Score_ extends Score<Score_>>
InnerScore<Score_>fullyAssigned(Score_ score) final inthashCode()Returns a hash code value for this object.booleanraw()Returns the value of therawrecord component.toString()Returns a string representation of this record class.intReturns the value of theunassignedCountrecord component.static <Score_ extends Score<Score_>>
InnerScore<Score_>withUnassignedCount(Score_ score, int unassignedCount)
-
Constructor Details
-
InnerScore
Creates an instance of aInnerScorerecord class.- Parameters:
raw- the value for therawrecord componentunassignedCount- the value for theunassignedCountrecord component
-
-
Method Details
-
fullyAssigned
-
withUnassignedCount
public static <Score_ extends Score<Score_>> InnerScore<Score_> withUnassignedCount(Score_ score, int unassignedCount) -
isFullyAssigned
public boolean isFullyAssigned() -
compareTo
- Specified by:
compareToin interfaceComparable<Score_ extends Score<Score_>>
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
raw
Returns the value of therawrecord component.- Returns:
- the value of the
rawrecord component
-
unassignedCount
public int unassignedCount()Returns the value of theunassignedCountrecord component.- Returns:
- the value of the
unassignedCountrecord component
-