MCPcopy Create free account
hub / github.com/PCGen/pcgen / copyContents

Method copyContents

code/src/java/pcgen/cdom/facet/SpellBookFacet.java:389–397  ·  view source on GitHub ↗

Copies the contents of the SpellBookFacet from one Player Character to another Player Character, based on the given CharIDs representing those Player Characters. This is a method in SpellBookFacet in order to avoid exposing the mutable Map object to other classes. This should not be inlined, as the

(CharID source, CharID copy)

Source from the content-addressed store, hash-verified

387 * information should be copied
388 */
389 @Override
390 public void copyContents(CharID source, CharID copy)
391 {
392 Map<String, SpellBook> map = getCachedMap(source);
393 if (map != null)
394 {
395 addAll(copy, map.values());
396 }
397 }
398}

Callers

nothing calls this directly

Calls 3

getCachedMapMethod · 0.95
addAllMethod · 0.95
valuesMethod · 0.45

Tested by

no test coverage detected