/** * Get the user's test ratings. * Summarizes the user's ratings from the history. * * @return The user's ratings for the test items. */ public Long2DoubleMap getTestRatings() { if (testRatings == null) { Predicate<Entity> predicate = Entities.typePredicate(CommonTypes.RATING); Function<Entity, Rating> targetViewClass = Entities.projection(Rating.class); ImmutableList<Rating> list = FluentIterable.from(testHistory).filter(predicate).transform(targetViewClass).toList(); testRatings = Ratings.userRatingVector(list); } return testRatings; } }