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

Method wasPrintedAtRarity

forge-core/src/main/java/forge/card/CardDb.java:1158–1163  ·  view source on GitHub ↗
(CardRarity rarity)

Source from the content-addressed store, hash-verified

1156
1157 // This Predicate validates if a card was printed at [rarity], on any of its printings
1158 @Override
1159 public Predicate<? super PaperCard> wasPrintedAtRarity(CardRarity rarity) {
1160 return paperCard -> getAllCards(paperCard).stream()
1161 .map(PaperCard::getRarity)
1162 .anyMatch(rarity::equals);
1163 }
1164
1165 public PaperCard createUnsupportedCard(String cardRequest) {
1166 CardRequest request = CardRequest.fromString(cardRequest);

Callers

nothing calls this directly

Calls 4

getAllCardsMethod · 0.95
anyMatchMethod · 0.65
mapMethod · 0.65
streamMethod · 0.65

Tested by

no test coverage detected