Refactor
This commit is contained in:
parent
6a9c4a4ccd
commit
e4817e9de8
|
@ -960,12 +960,8 @@ public class MediaDetection {
|
||||||
|
|
||||||
// sort by similarity to original query (descending)
|
// sort by similarity to original query (descending)
|
||||||
List<Movie> results = new ArrayList<Movie>(probabilityMap.keySet());
|
List<Movie> results = new ArrayList<Movie>(probabilityMap.keySet());
|
||||||
sort(results, new Comparator<Movie>() {
|
results.sort((a, b) -> {
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compare(Movie a, Movie b) {
|
|
||||||
return probabilityMap.get(b).compareTo(probabilityMap.get(a));
|
return probabilityMap.get(b).compareTo(probabilityMap.get(a));
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
|
|
Loading…
Reference in New Issue