[Change] PreLoadDataAttributeComparator 更改类名;

This commit is contained in:
LamGC 2020-06-13 00:28:52 +08:00
parent ad54dbfbf3
commit 91f8b0070f
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ import net.lamgc.cgj.bot.cache.CacheStoreCentral;
import net.lamgc.cgj.bot.cache.JsonRedisCacheStore; import net.lamgc.cgj.bot.cache.JsonRedisCacheStore;
import net.lamgc.cgj.bot.event.BufferMessageEvent; import net.lamgc.cgj.bot.event.BufferMessageEvent;
import net.lamgc.cgj.bot.sort.PreLoadDataAttribute; import net.lamgc.cgj.bot.sort.PreLoadDataAttribute;
import net.lamgc.cgj.bot.sort.PreLoadDataComparator; import net.lamgc.cgj.bot.sort.PreLoadDataAttributeComparator;
import net.lamgc.cgj.pixiv.PixivDownload; import net.lamgc.cgj.pixiv.PixivDownload;
import net.lamgc.cgj.pixiv.PixivDownload.PageQuality; import net.lamgc.cgj.pixiv.PixivDownload.PageQuality;
import net.lamgc.cgj.pixiv.PixivSearchLinkBuilder; import net.lamgc.cgj.pixiv.PixivSearchLinkBuilder;
@ -338,7 +338,7 @@ public class BotCommandProcess {
.getAsJsonObject(searchArea.jsonKey).getAsJsonArray("data"); .getAsJsonObject(searchArea.jsonKey).getAsJsonArray("data");
ArrayList<JsonElement> illustsList = new ArrayList<>(); ArrayList<JsonElement> illustsList = new ArrayList<>();
illustsArray.forEach(illustsList::add); illustsArray.forEach(illustsList::add);
illustsList.sort(new PreLoadDataComparator(PreLoadDataAttribute.LIKE)); illustsList.sort(new PreLoadDataAttributeComparator(PreLoadDataAttribute.BOOKMARK));
log.debug("已找到与 {} 相关插图信息({})", content, searchArea.name().toLowerCase()); log.debug("已找到与 {} 相关插图信息({})", content, searchArea.name().toLowerCase());
int count = 1; int count = 1;

View File

@ -10,11 +10,11 @@ import java.util.Comparator;
/** /**
* 收藏数比较器 * 收藏数比较器
*/ */
public class PreLoadDataComparator implements Comparator<JsonElement> { public class PreLoadDataAttributeComparator implements Comparator<JsonElement> {
private final PreLoadDataAttribute attribute; private final PreLoadDataAttribute attribute;
public PreLoadDataComparator(PreLoadDataAttribute attribute) { public PreLoadDataAttributeComparator(PreLoadDataAttribute attribute) {
this.attribute = attribute; this.attribute = attribute;
} }