public abstract class AbstractItemScorer extends java.lang.Object implements ItemScorer
Base class to make item scorers easier to implement. Delegates all score methods to ItemScorer.scoreWithDetails(long, Collection)
.
Constructor and Description |
---|
AbstractItemScorer() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Long,java.lang.Double> |
score(long user,
java.util.Collection<java.lang.Long> items)
Score a collection of items.
|
Result |
score(long user,
long item)
Score a single item.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
scoreWithDetails
public Result score(long user, long item)
Score a single item.
This implementation delegates to ItemScorer.scoreWithDetails(long, Collection)
.
score
in interface ItemScorer
user
- The user ID for whom to generate a score.item
- The item ID to score.null
if no score can be generated.@Nonnull public java.util.Map<java.lang.Long,java.lang.Double> score(long user, @Nonnull java.util.Collection<java.lang.Long> items)
Score a collection of items.
This implementation delegates to ItemScorer.scoreWithDetails(long, Collection)
.
score
in interface ItemScorer
user
- The user ID for whom to generate scores.items
- The item to score.