Record Class DefaultRecommendedAssignment<Proposition_,Score_ extends Score<Score_>>
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.solver.DefaultRecommendedAssignment<Proposition_,Score_>
- All Implemented Interfaces:
RecommendedAssignment<Proposition_,,Score_> Comparable<DefaultRecommendedAssignment<Proposition_,Score_>>
public record DefaultRecommendedAssignment<Proposition_,Score_ extends Score<Score_>> (long index, @Nullable Proposition_ proposition, @NonNull ScoreAnalysis<Score_ extends Score<Score_>> scoreAnalysisDiff)
extends Record
implements RecommendedAssignment<Proposition_,Score_>, Comparable<DefaultRecommendedAssignment<Proposition_,Score_>>
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultRecommendedAssignment(long index, @Nullable Proposition_ proposition, @NonNull ScoreAnalysis<Score_> scoreAnalysisDiff) Creates an instance of aDefaultRecommendedAssignmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longindex()Returns the value of theindexrecord component.@Nullable Proposition_Returns the value of thepropositionrecord component.@NonNull ScoreAnalysis<Score_>Returns the value of thescoreAnalysisDiffrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DefaultRecommendedAssignment
public DefaultRecommendedAssignment(long index, @Nullable Proposition_ proposition, @NonNull ScoreAnalysis<Score_> scoreAnalysisDiff) Creates an instance of aDefaultRecommendedAssignmentrecord class.- Parameters:
index- the value for theindexrecord componentproposition- the value for thepropositionrecord componentscoreAnalysisDiff- the value for thescoreAnalysisDiffrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<Proposition_>
-
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 '=='. -
index
public long index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
proposition
Returns the value of thepropositionrecord component.- Specified by:
propositionin interfaceRecommendedAssignment<Proposition_,Score_ extends Score<Score_>> - Returns:
- the value of the
propositionrecord component
-
scoreAnalysisDiff
Returns the value of thescoreAnalysisDiffrecord component.- Specified by:
scoreAnalysisDiffin interfaceRecommendedAssignment<Proposition_,Score_ extends Score<Score_>> - Returns:
- the value of the
scoreAnalysisDiffrecord component
-