import com.google.common.base.Function;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Maps;
import com.google.common.collect.Ordering;
import com.google.common.collect.Sets;
newEpisodes.clear();
changedEpisodes.clear();
this.allEpisodes.clear();
- Map<Episode, Episode> allEpisodes = FluentIterable.from(((EpisodeState) previousState).episodes()).toMap(new Function<Episode, Episode>() {
+ Map<Episode, Episode> allEpisodes = Maps.newHashMap(FluentIterable.from(((EpisodeState) previousState).episodes()).toMap(new Function<Episode, Episode>() {
@Override
public Episode apply(Episode episode) {
return episode;
}
- });
+ }));
for (Episode episode : ((EpisodeState) currentState).episodes()) {
if (!allEpisodes.containsKey(episode)) {
allEpisodes.put(episode, episode);