public abstract class AbstractItemScorer extends 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 |
|---|---|
Map<Long,Double> |
score(long user,
Collection<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, waitscoreWithDetailspublic Result score(long user, long item)
Score a single item.
This implementation delegates to ItemScorer.scoreWithDetails(long, Collection).
score in interface ItemScoreruser - The user ID for whom to generate a score.item - The item ID to score.null if no score can be generated.@Nonnull public Map<Long,Double> score(long user, @Nonnull Collection<Long> items)
Score a collection of items.
This implementation delegates to ItemScorer.scoreWithDetails(long, Collection).
score in interface ItemScoreruser - The user ID for whom to generate scores.items - The item to score.