Interface RecommendedAssignment<Proposition_,Score_ extends Score<Score_>>
- Type Parameters:
Proposition_- the generic type of the proposition as returned by the proposition functionScore_- the generic type of the score
- All Known Subinterfaces:
RecommendedFit<Proposition_,Score_>
- All Known Implementing Classes:
DefaultRecommendedAssignment,DefaultRecommendedFit
SolutionManager.recommendFit(Object, Object, Function).
In order to be fully serializable to JSON, propositions must be fully serializable to JSON.
For deserialization from JSON, the user needs to provide the deserializer themselves.
This is due to the fact that, once the proposition is received over the wire,
we no longer know which type was used.
The user has all of that information in their domain model,
and so they are the correct party to provide the deserializer.
See also ScoreAnalysis Javadoc for additional notes on serializing and deserializing that type.
-
Method Summary
Modifier and TypeMethodDescription@Nullable Proposition_Returns the proposition as returned by the proposition function.@NonNull ScoreAnalysis<Score_>Difference between the original score and the score of the solution with the recommendation applied.
-
Method Details
-
proposition
@Nullable Proposition_ proposition()Returns the proposition as returned by the proposition function. This is the actual assignment recommended to the user.- Returns:
- null if proposition function required null
-
scoreAnalysisDiff
@NonNull ScoreAnalysis<Score_> scoreAnalysisDiff()Difference between the original score and the score of the solution with the recommendation applied.If
SolutionManager.recommendAssignment(Object, Object, Function, ScoreAnalysisFetchPolicy)was called withScoreAnalysisFetchPolicy.FETCH_ALL, the analysis will includeconstraint matchesinside itsconstraint analysis; otherwise it will not.- Returns:
fittedScoreAnalysis - originalScoreAnalysisas defined byScoreAnalysis.diff(ScoreAnalysis)
-