public static class PrecomputedItemScorer.Builder
extends java.lang.Object
Builder for mock item scorers.
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
PrecomputedItemScorer.Builder |
addResults(long user,
Result... scores)
Add results for a user.
|
PrecomputedItemScorer.Builder |
addScore(long user,
long item,
double score)
Add a score.
|
PrecomputedItemScorer |
build()
Construct the mock item scorer.
|
public PrecomputedItemScorer.Builder addResults(long user, Result... scores)
Add results for a user.
user
- The user.scores
- The scores to add.public PrecomputedItemScorer.Builder addScore(long user, long item, double score)
Add a score. When the item is scored for the user, the mock scorer will return this score.
user
- The user ID.item
- The item ID.score
- The score to return.public PrecomputedItemScorer build()
Construct the mock item scorer. This will empty the builder.