MCPcopy Create free account
hub / github.com/Card-Forge/forge / wasPrintedInSets

Method wasPrintedInSets

forge-core/src/main/java/forge/card/CardDb.java:1140–1148  ·  view source on GitHub ↗
(Collection<String> setCodes)

Source from the content-addressed store, hash-verified

1138 }
1139
1140 @Override
1141 public Predicate<? super PaperCard> wasPrintedInSets(Collection<String> setCodes) {
1142 Set<String> sets = new HashSet<>(setCodes);
1143 return paperCard -> getAllCards(paperCard).stream()
1144 .map(PaperCard::getEdition).anyMatch(editionCode ->
1145 sets.contains(editionCode) &&
1146 StaticData.instance().getCardEdition(editionCode).isCardObtainable(paperCard.getName())
1147 );
1148 }
1149
1150 // This Predicate validates if a card is legal in a given format (identified by the list of allowed sets)
1151 @Override

Callers

nothing calls this directly

Calls 9

getAllCardsMethod · 0.95
instanceMethod · 0.95
isCardObtainableMethod · 0.80
getCardEditionMethod · 0.80
anyMatchMethod · 0.65
mapMethod · 0.65
streamMethod · 0.65
containsMethod · 0.65
getNameMethod · 0.65

Tested by

no test coverage detected