package org.lenskit.test;

import org.grouplens.lenskit.RatingPredictor;
import org.grouplens.lenskit.ItemScorer;
import org.grouplens.lenskit.vectors.MutableSparseVector;
import org.grouplens.lenskit.vectors.SparseVector;

import javax.annotation.Nonnull;
import javax.inject.Inject;
import java.lang.Long;
import java.lang.Override;
import java.util.Collection;

class TestComponent implements RatingPredictor {
    private ItemScorer scorer;

    @Inject
    public TestComponent(ItemScorer s) {
        scorer = s;
    }

    @Override
    public double predict(long user, long item) {
        return scorer.score(user, item);
    }

    @Nonnull
    @Override
    public SparseVector predict(long user, @Nonnull Collection<Long> items) {
        return scorer.score(user, items);
    }

    @Override
    public void predict(long user, @Nonnull MutableSparseVector predictions) {
        scorer.score(user, predictions);
    }
}

@@ -35,191 +35,135 @@
 org.
-grouplens.lenskit.RatingPredictor;%0Aimport org.grouplens.lenskit.ItemScorer;%0Aimport org.grouplens.lenskit.vectors.MutableSparseVector;%0Aimport org.grouplens.lenskit.vectors.SparseVector
+lenskit.api.ItemScorer;%0Aimport org.lenskit.api.RatingPredictor;%0Aimport org.lenskit.api.Result;%0Aimport org.lenskit.api.ResultMap
 ;%0A%0Ai
@@ -226,58 +226,8 @@
 ct;%0A
-import java.lang.Long;%0Aimport java.lang.Override;%0A
 impo
@@ -250,16 +250,38 @@
 lection;
+%0Aimport java.util.Map;
 %0A%0Aclass 
@@ -427,32 +427,45 @@
 rer = s;%0A    %7D%0A%0A
+    @Nonnull%0A
     @Override%0A  
@@ -477,43 +477,79 @@
 lic 
-double predict(long user, l
+ResultMap predictWithDetails(long user, @Nonnull Collection%3CL
 ong
+%3E
  item
+s
 ) %7B%0A
@@ -567,32 +567,43 @@
 urn scorer.score
+WithDetails
 (user, item);%0A  
@@ -597,16 +597,17 @@
 er, item
+s
 );%0A    %7D
@@ -604,37 +604,24 @@
 ms);%0A    %7D%0A%0A
-    @Nonnull%0A
     @Overrid
@@ -633,28 +633,22 @@
  public 
-SparseVector
+Result
  predict
@@ -663,39 +663,17 @@
 er, 
-@Nonnull Collection%3CL
+l
 ong
-%3E
  item
-s
 ) %7B%0A
@@ -702,33 +702,32 @@
 score(user, item
-s
 );%0A    %7D%0A%0A    @O
@@ -712,32 +712,45 @@
 , item);%0A    %7D%0A%0A
+    @Nonnull%0A
     @Override%0A  
@@ -762,12 +762,25 @@
 lic 
-void
+Map%3CLong, Double%3E
  pre
@@ -808,38 +808,29 @@
 ull 
-MutableSparseVector prediction
+Collection%3CLong%3E item
 s) %7B
@@ -834,24 +834,31 @@
 ) %7B%0A        
+return 
 scorer.score
@@ -868,18 +868,12 @@
 er, 
-prediction
+item
 s);%0A

Fix cli-classpath tests