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

Method getOrCreate

forge-core/src/main/java/forge/deck/Deck.java:223–230  ·  view source on GitHub ↗
(DeckSection deckSection)

Source from the content-addressed store, hash-verified

221
222 // will return new if it was absent
223 public CardPool getOrCreate(DeckSection deckSection) {
224 CardPool p = get(deckSection);
225 if (p != null)
226 return p;
227 p = new CardPool();
228 this.parts.put(deckSection, p);
229 return p;
230 }
231
232 public void putSection(DeckSection section, CardPool pool) {
233 this.parts.put(section, pool);

Callers 15

prepareAllZonesMethod · 0.95
generateDeckMethod · 0.95
DeckMethod · 0.95
buildDeckMethod · 0.95
buildDeckMethod · 0.95
generateSealedDeckMethod · 0.95
generateDeckMethod · 0.95
addToQuestDecksMethod · 0.95
unmarshalMethod · 0.95

Calls 2

getMethod · 0.95
putMethod · 0.45

Tested by

no test coverage detected