The CardQuestWorldFilter constructors overload to include option to disable reprints.

The CardQuestWorldFilter has been updated with two extra constructors overload that also control the option to include or not the `allowReprints` attribute.
By default, the allowReprints attribute is true for backward compatibility.

The new constructor will be used (next commit) by CardManager when creating filters in Card Catalog.
This commit is contained in:
leriomaggio
2021-07-04 17:27:56 +01:00
parent ef18dac22c
commit eed49554b5

View File

@@ -14,12 +14,21 @@ public class CardQuestWorldFilter extends CardFormatFilter {
private final Set<QuestWorld> questWorlds = new HashSet<>(); private final Set<QuestWorld> questWorlds = new HashSet<>();
public CardQuestWorldFilter(final ItemManager<? super PaperCard> itemManager0) { public CardQuestWorldFilter(final ItemManager<? super PaperCard> itemManager0) {
this(itemManager0, true);
}
public CardQuestWorldFilter(final ItemManager<? super PaperCard> itemManager0, boolean allowReprints) {
super(itemManager0); super(itemManager0);
this.allowReprints = allowReprints;
} }
public CardQuestWorldFilter(final ItemManager<? super PaperCard> itemManager0, final QuestWorld questWorld0) { public CardQuestWorldFilter(final ItemManager<? super PaperCard> itemManager0, final QuestWorld questWorld0) {
this(itemManager0, questWorld0, true);
}
public CardQuestWorldFilter(final ItemManager<? super PaperCard> itemManager0, final QuestWorld questWorld0, boolean allowReprints){
super(itemManager0); super(itemManager0);
this.questWorlds.add(questWorld0); this.questWorlds.add(questWorld0);
this.formats.add(getQuestWorldFormat(questWorld0)); this.formats.add(getQuestWorldFormat(questWorld0));
this.allowReprints = allowReprints;
} }
@Override @Override