RelatedAnimeFinderService.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:manami 作者:
/**
 * @param cache
 *            Instance of the cache.
 * @param app
 *            Instance of the manami app.
 * @param list
 *            List which being checked for related anime.
 * @param observer
 *            Observer which is being notified about the progress. It also
 *            gets the result as a list through notification.
 */
public RelatedAnimeFinderService(final Cache cache, final Manami app, final List<? extends MinimalEntry> list, final Observer observer) {
    this.app = app;
    this.cache = cache;
    this.list = list;
    addObserver(observer);
    myAnime = newArrayList();
    relatedAnime = newHashMap();
    animeToCheck = new Stack<>();
    checkedAnime = new ObservableSetWrapper<>(newHashSet());
    checkedAnime.addListener((SetChangeListener<InfoLink>) event -> {
        setChanged();
        notifyObservers(new ProgressState(checkedAnime.size() + 1, animeToCheck.size()));
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号